Re: [PATCH] watchdog: Fix memleak in watchdog_cdev_register

2020-08-24 Thread Guenter Roeck
On Mon, Aug 24, 2020 at 10:40:01AM +0800, Dinghao Liu wrote: > When watchdog_kworker is NULL, we should free wd_data > before the function returns to prevent memleak. > > Fixes: 664a39236e718 ("watchdog: Introduce hardware maximum heartbeat in > watchdog core") > Signed-off-by: Dinghao Liu

[PATCH] watchdog: Fix memleak in watchdog_cdev_register

2020-08-23 Thread Dinghao Liu
When watchdog_kworker is NULL, we should free wd_data before the function returns to prevent memleak. Fixes: 664a39236e718 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") Signed-off-by: Dinghao Liu --- drivers/watchdog/watchdog_dev.c | 4 +++- 1 file changed, 3