]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: fix memory leak in block2mtd_setup()
authorJesper Juhl <jesper.juhl@gmail.com>
Sat, 13 May 2006 23:42:25 +0000 (01:42 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Sun, 14 May 2006 00:21:31 +0000 (01:21 +0100)
commit277f672df69a506672c29d820dd0f2f85265eb3e
tree56010126c6a1660b6fbd97765c73f8808214f98c
parent06e49fa12b203da587ab2937a0af758331da24a2
mtd: fix memory leak in block2mtd_setup()

There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup()

We can leak 'name' allocated with kmalloc in 'parse_name' if leave via
the 'parse_err' macro since it contains a return but doesn't do any
freeing.

Spotted by coverity checker as bug 615.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/devices/block2mtd.c