[PATCH v2] mtd: parsers: qcom: Fix leaking of partition name
Miquel Raynal
miquel.raynal at bootlin.com
Wed May 26 02:02:37 PDT 2021
On Tue, 2021-05-25 at 23:09:31 UTC, Ansuel Smith wrote:
> Add cleanup function as the name variable for the partition name was
> allocaed but never freed after the use as the add mtd function
> duplicate the name and free the pparts struct as the partition name is
> assumed to be static.
> The leak was found using kmemleak.
>
> Fixes: 803eb124e1a6 ("mtd: parsers: Add Qcom SMEM parser")
> Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
> Reviewed-by: Bjorn Andersson <bjorn.andersson at linaro.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
More information about the linux-mtd
mailing list