]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
nbd: fix memory leak of nbd_dev array
authorSven Wegener <sven.wegener@stealer.net>
Wed, 20 Aug 2008 21:09:07 +0000 (14:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Aug 2008 22:40:30 +0000 (15:40 -0700)
commitf3944d61ddc65722539ffd7b6f5b7c7217c136cc
treedd48fb10e38df546535b1b3aa576aec79937e4ac
parent759f9a2df78d2156a2675edc7999fb4c919a3159
nbd: fix memory leak of nbd_dev array

We leak the memory allocated for the nbd_dev array at multiple places.
Fix them by either adding a kfree() or by rearranging code to return
before we allocate the memory.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Cc: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/nbd.c