cciss: fix memory leak
authorJesper Juhl <jesper.juhl@gmail.com>
Thu, 7 Feb 2008 20:03:11 +0000 (21:03 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Feb 2008 23:59:17 +0000 (15:59 -0800)
commitbc0fb02f5fd30a518b659320b89ee58ea78fb979
tree5f619c13e28ead9db09bae74dddefde278e5c8a6
parente2f18d53125bf0753169de321af25b0df1b758c5
cciss: fix memory leak

mainline: f2912a1223c0917a7b4e054f18086209137891ea

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>
Cc: Oliver Pinter <oliver.pntr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/cciss.c