aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorChristophe Jaillet <[email protected]>2017-08-08 16:39:54 +0200
committerZhang Rui <[email protected]>2017-08-11 11:34:07 +0800
commit9d9ca1f9f04cf1d20427528cd3b3d05ebad47547 (patch)
tree70384f8f55ac24f69d766409c93b0aa4a58aac3b /lib/memory-notifier-error-inject.c
parent6a6cd25b58dc8ce2fbded8dd83bfa7d48f06f97d (diff)
thermal: core: Fix resources release in error paths in thermal_zone_device_register()
Reorder error handling code in order to fix some resources leaks in some cases: - 'tz' would leak if 'thermal_zone_create_device_groups()' fails - memory allocated by 'thermal_zone_create_device_groups()' would leak if 'device_register()' fails With this patch, we now have 2 error handling paths: one before 'device_register()', and one after it. This is needed because some resources are released in 'thermal_release()'. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Zhang Rui <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions