Files
android_kernel_xiaomi_sm8450/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
..
2006-05-12 15:35:51 +01:00
2006-03-31 12:18:48 -08:00
2006-04-17 15:48:16 +01:00
2006-03-31 12:18:49 -08:00
2006-01-08 20:13:45 -08:00