Re: [PATCH] physmap: Fix leak of memory returned byparse_mtd_partitions

From: Atsushi Nemoto
Date: Wed Nov 12 2008 - 10:28:22 EST


On Wed, 12 Nov 2008 23:57:33 +0900 (JST), Atsushi Nemoto <anemo@xxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/