cciss: fix memory leak
commit5602459d9866435fe99a50bd0fd7ad56bc85c2f5
authorGreg KH <gregkh@suse.de>
Fri, 22 Feb 2008 21:31:15 +0000 (22 13:31 -0800)
committerOliver Pinter <oliver.pntr@gmail.com>
Sat, 23 Feb 2008 20:04:50 +0000 (23 21:04 +0100)
tree6d24c17b4aca53ec306ddb17041171c8c79d8215
parent4eae036cf82cd450ab0eee1576874c7ab0881fab
cciss: fix memory leak

2.6.22-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jesper Juhl <jesper.juhl@gmail.com>

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>
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
drivers/block/cciss.c