Commit bc50e498 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Greg Kroah-Hartman
Browse files

thermal/lib: Fix memory leak on error in thermal_genl_auto()



[ Upstream commit 7569406e ]

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: 47c4b0de ("tools/lib/thermal: Add a thermal library")
Reported-by: default avatarLukasz Luba <lukasz.luba@arm.com&gt;>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: default avatarLukasz 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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ad921045
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment