Commit b97e01a5 authored by Fabien Parent's avatar Fabien Parent Committed by Lipeng Sang
Browse files

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: default avatarFabien Parent <fabien.parent@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent 4e5f4703
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment