cpufreq: qcom: fix memory leak in error path
stable inclusion from stable-v5.10.152 commit e55feb31df3fc78b880d6e9d4b5853f05c974833 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e55feb31df3fc78b880d6e9d4b5853f05c974833 -------------------------------- commit 9f42cf54 upstream. If for some reason the speedbin length is incorrect, then there is a memory leak in the error path because we never free the speedbin buffer. This commit fixes the error path to always free the speedbin buffer. Cc: v5.7+ <stable@vger.kernel.org> # v5.7+ Fixes: a8811ec7 ("cpufreq: qcom: Add support for krait based socs") Signed-off-by:Fabien Parent <fabien.parent@linaro.org> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Lipeng Sang <sanglipeng1@jd.com>
Loading
Please sign in to comment