]> git.baikalelectronics.ru Git - kernel.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)
commit4fb05e1a5f5c076499535a30b96b23816d120429
treebb5598f1c205244277ce352951bc9de1800d0df1
parented4a4c2e93183b028bb323bbef4ca71ad629ddea
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