nbd: fix possible memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 27 Jan 2015 12:38:22 +0000 (18:08 +0530)
committerSasha Levin <sasha.levin@oracle.com>
Thu, 23 Apr 2015 18:58:28 +0000 (14:58 -0400)
commit4f33d5001b3e25e89e29277c85b954f9a2f75248
tree4f71c070e4f1827d81084527032ef2bd4576bfa5
parent43d9ca6b598118b0257180f6fa36b7486eef057f
nbd: fix possible memory leak

[ Upstream commit ff6b8090e26ef7649ef0cc6b42389141ef48b0cf ]

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/block/nbd.c