Messages in this thread | | | Date | Thu, 13 Nov 2008 00:28:14 +0900 (JST) | Subject | Re: [PATCH] physmap: Fix leak of memory returned by parse_mtd_partitions | From | Atsushi Nemoto <> |
| |
On Wed, 12 Nov 2008 23:57:33 +0900 (JST), Atsushi Nemoto <anemo@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 regression.
Anyway, I suppose ar7part parser also should return kmalloced memory, as like as all other parsers.
--- Atsushi Nemoto
| |