]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: qcom: fix memory leak in error path
authorFabien Parent <fabien.parent@linaro.org>
Sat, 15 Oct 2022 13:04:22 +0000 (15:04 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 18 Oct 2022 10:52:25 +0000 (16:22 +0530)
commit6ad64905d81ac612a61c1c81f1ed0df15443087a
treeaa92a06db5d33f8f78098792a9782c34eb80e854
parent13e9d48de77f1675621c43bb559c83fd2e034138
cpufreq: qcom: fix memory leak in error path

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: 02a7e0599967 ("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>
drivers/cpufreq/qcom-cpufreq-nvmem.c