Skip to content
Commit 5afb6d20 authored by Dinghao Liu's avatar Dinghao Liu Committed by Wim Van Sebroeck
Browse files

watchdog: Fix memleak in watchdog_cdev_register



When watchdog_kworker is NULL, we should free wd_data
before the function returns to prevent memleak.

Fixes: 664a3923 ("watchdog: Introduce hardware maximum heartbeat in watchdog core")
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200824024001.25474-1-dinghao.liu@zju.edu.cn


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 74394946
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment