linux-yocto/tools/lib/thermal
Daniel Lezcano cc08c2c8e9 thermal/lib: Fix memory leak on error in thermal_genl_auto()
[ Upstream commit 7569406e95 ]

The function thermal_genl_auto() does not free the allocated message
in the error path. Fix that by putting a out label and jump to it
which will free the message instead of directly returning an error.

Fixes: 47c4b0de08 ("tools/lib/thermal: Add a thermal library")
Reported-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20241024105938.1095358-1-daniel.lezcano@linaro.org
[ rjw: Fixed up the !msg error path, added Fixes tag ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:31:50 +01:00
..
include
.gitignore
Build
commands.c thermal/lib: Fix memory leak on error in thermal_genl_auto() 2024-12-09 10:31:50 +01:00
events.c
libthermal.map
libthermal.pc.template
Makefile tools/lib/thermal: Remove the thermal.h soft link when doing make clean 2024-12-09 10:31:38 +01:00
sampling.c tools/lib/thermal: Fix sampling handler context ptr 2024-11-14 13:19:33 +01:00
thermal_nl.c
thermal_nl.h
thermal.c