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
..
2006-04-11 06:18:46 -07:00
2006-04-11 06:18:40 -07:00
2006-05-14 00:13:30 +01:00
2006-05-02 15:26:06 -04:00
2006-05-01 18:17:46 -07:00
2006-05-01 18:17:45 -07:00
2006-03-23 07:38:16 -08:00
2006-03-24 18:23:14 +01:00
2006-04-21 10:59:00 -07:00