Re: [PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path

2017-08-08 Thread Zhang Rui
On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > 'tz' is freed in some error handling paths but not in the main one. > So free it also here to avoid a memory leak. > After device registered, tz is freed in thermal_release(). thanks, rui > Signed-off-by: Christophe JAILLET

Re: [PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path

2017-08-08 Thread Zhang Rui
On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > 'tz' is freed in some error handling paths but not in the main one. > So free it also here to avoid a memory leak. > After device registered, tz is freed in thermal_release(). thanks, rui > Signed-off-by: Christophe JAILLET > --- >  

[PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path

2017-07-16 Thread Christophe JAILLET
'tz' is freed in some error handling paths but not in the main one. So free it also here to avoid a memory leak. Signed-off-by: Christophe JAILLET --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c

[PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path

2017-07-16 Thread Christophe JAILLET
'tz' is freed in some error handling paths but not in the main one. So free it also here to avoid a memory leak. Signed-off-by: Christophe JAILLET --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c