]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
cciss: fix memory leak
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 31 Jul 2007 07:39:39 +0000 (00:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:43 +0000 (15:39 -0700)
commitf2912a1223c0917a7b4e054f18086209137891ea
treebb5598f1c205244277ce352951bc9de1800d0df1
parentff0cfc66cd99d59e3a8024003171035e4ae192b7
cciss: fix memory leak

There's a memory leak in the cciss driver.

in alloc_cciss_hba() we may leak sizeof(ctlr_info_t) bytes if a
call to alloc_disk(1 << NWD_SHIFT) fails.
This patch should fix the issue.

Spotted by the Coverity checker.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/cciss.c