[PATCH] physmap: Fix leak of memory returned by parse_mtd_partitions
anemo at mba.ocn.ne.jp
Wed Nov 12 10:28:14 EST 2008
On Wed, 12 Nov 2008 23:57:33 +0900 (JST), Atsushi Nemoto <anemo at mba.ocn.ne.jp> wrote:
> The mtd partition parser returns an allocated pointer array of
> mtd_partition. The caller must free it. The array is used only for
> add_mtd_partitions(), so free it just after the call.
Note: all parsers except for the ar7part return kmalloced memory.
The ar7part parser returns a pointer of static array. While currently
there is no in-kernel user of this parser, there should not be cause
Anyway, I suppose ar7part parser also should return kmalloced memory,
as like as all other parsers.
More information about the linux-mtd