[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dff05531-f5e3-400a-abf0-a5307c50357e@web.de>
Date: Thu, 6 Nov 2025 16:16:05 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Liyuan Pang <pangliyuan1@...wei.com>, linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>,
wanqian10@...wei.com, Yang Liu <young.liuyang@...wei.com>,
Zhihao Cheng <chengzhihao1@...wei.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ubi: fastmap: fix ubi->fm memory leak
…
> +++ b/drivers/mtd/ubi/fastmap.c
> @@ -1644,3 +1644,15 @@ int ubi_update_fastmap(struct ubi_device *ubi)
…
> +void ubi_free_fastmap(struct ubi_device *ubi)
> +{
> + int i;
> +
> + if (ubi->fm) {
> + for (i = 0; i < ubi->fm->used_blocks; i++)
> + kmem_cache_free(ubi_wl_entry_slab, ubi->fm->e[i]);
…
> + }
> +}
…
May the local variable “i” be defined in the loop header?
Regards,
Markus
Powered by blists - more mailing lists