Patch "mtd: parsers: qcom: Fix missing free for pparts in cleanup" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mtd: parsers: qcom: Fix missing free for pparts in cleanup

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mtd-parsers-qcom-fix-missing-free-for-pparts-in-clea.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 34e4a9ce299f7f5a20814c71c590cc14810fe2c5
Author: Ansuel Smith <ansuelsmth@xxxxxxxxx>
Date:   Sun Jan 16 04:22:11 2022 +0100

    mtd: parsers: qcom: Fix missing free for pparts in cleanup
    
    [ Upstream commit 3dd8ba961b9356c4113b96541c752c73d98fef70 ]
    
    Mtdpart doesn't free pparts when a cleanup function is declared.
    Add missing free for pparts in cleanup function for smem to fix the
    leak.
    
    Fixes: 10f3b4d79958 ("mtd: parsers: qcom: Fix leaking of partition name")
    Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>
    Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
    Link: https://lore.kernel.org/linux-mtd/20220116032211.9728-2-ansuelsmth@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mtd/parsers/qcomsmempart.c b/drivers/mtd/parsers/qcomsmempart.c
index f4fc7635c1f39..32ddfea701423 100644
--- a/drivers/mtd/parsers/qcomsmempart.c
+++ b/drivers/mtd/parsers/qcomsmempart.c
@@ -173,6 +173,8 @@ static void parse_qcomsmem_cleanup(const struct mtd_partition *pparts,
 
 	for (i = 0; i < nr_parts; i++)
 		kfree(pparts[i].name);
+
+	kfree(pparts);
 }
 
 static const struct of_device_id qcomsmem_of_match_table[] = {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux