kernel_optimize_test/drivers/mtd
Jesper Juhl 4f678a58d3 mtd: fix memory leaks in phram_setup
There are two code paths in drivers/mtd/devices/phram.c::phram_setup() that
will leak memory.
Memory is allocated to the variable 'name' with kmalloc() by the
parse_name() function, but if we leave by way of the parse_err() macro,
then that memory is never kfree()'d, nor is it ever used with
register_device() so it won't be freed later either - leak.

Found by the Coverity checker as #593 - simple fix below.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-14 00:13:30 +01:00
..
chips Export cfi_cmdset_0020 and cfi_cmdset_0002 with EXPORT_SYMBOL_GPL 2006-05-08 22:58:25 +01:00
devices mtd: fix memory leaks in phram_setup 2006-05-14 00:13:30 +01:00
maps Trivial typo fixes in Kconfig files (MTD). 2006-05-12 17:35:02 +01:00
nand [MTD NAND] Indent all of drivers/mtd/nand/*.c. 2006-05-13 18:07:53 +01:00
onenand OneNAND: fix block command typo 2006-05-12 15:35:51 +01:00
afs.c [MTD] core: Clean up trailing white spaces 2005-11-07 13:37:38 +01:00
cmdlinepart.c [PATCH] mtd cmdlinepart: allow zero offset value 2006-03-31 12:18:48 -08:00
ftl.c [MTD] Make functions static, include header files with prototypes 2005-11-29 19:54:58 +01:00
inftlcore.c [PATCH] Fix debug statement in inftlcore.c 2006-03-31 12:18:48 -08:00
inftlmount.c Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6 2005-11-07 10:24:08 -08:00
Kconfig Trivial typo fixes in Kconfig files (MTD). 2006-05-12 17:35:02 +01:00
Makefile [MTD] Add initial support for OneNAND flash chips 2005-11-06 21:17:24 +01:00
mtd_blkdevs.c [PATCH] sem2mutex: drivers/mtd/ 2006-03-31 12:18:48 -08:00
mtdblock_ro.c Make mtdblock_ro unconditionally readonly 2006-04-17 15:48:16 +01:00
mtdblock.c Simplify test for RAM devices 2006-04-17 15:48:16 +01:00
mtdchar.c OneNAND: One-Time Programmable (OTP) support 2006-05-12 15:35:50 +01:00
mtdconcat.c BUG_ON() Conversion in drivers/mtd/ 2006-03-26 18:15:12 +02:00
mtdcore.c [PATCH] Kill ifdefs in mtdcore.c 2006-03-31 12:18:49 -08:00
mtdpart.c [MTD] core: Clean up trailing white spaces 2005-11-07 13:37:38 +01:00
nftlcore.c Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6 2005-11-07 10:24:08 -08:00
nftlmount.c [MTD] core: Clean up trailing white spaces 2005-11-07 13:37:38 +01:00
redboot.c [PATCH] mtd/redboot: Handle holes in fis table 2006-03-31 12:18:49 -08:00
rfd_ftl.c [PATCH] fix more missing includes 2006-01-08 20:13:45 -08:00