nbd: fix possible memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 27 Jan 2015 12:38:22 +0000 (18:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Apr 2015 08:10:47 +0000 (10:10 +0200)
commitef6b5eaddd79fd6515c4eaf7506839bd9c60921c
tree674fc21e2a4fe6058a6eaf845a436fee78435b87
parenta0688f524c6dcd43e5dff5f57f46e962e4c44548
nbd: fix possible memory leak

commit ff6b8090e26ef7649ef0cc6b42389141ef48b0cf upstream.

we have already allocated memory for nbd_dev, but we were not
releasing that memory and just returning the error value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Paul Clements <Paul.Clements@SteelEye.com>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/nbd.c