aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-11-21 12:04:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-11-21 12:04:50 -0800
commitbe5fa3aac23fde1a00547ed87144e1f3268cdb48 (patch)
tree6fa2297c2ec62b64e386ad644b91826cc3ac737c /drivers
parentMerge tag 'gpio-v5.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio (diff)
parentnbd:fix memory leak in nbd_get_socket() (diff)
downloadlinux-dev-be5fa3aac23fde1a00547ed87144e1f3268cdb48.tar.xz
linux-dev-be5fa3aac23fde1a00547ed87144e1f3268cdb48.zip
Merge tag 'for-linus-20191121' of git://git.kernel.dk/linux-block
Pull block fix from Jens Axboe: "Just a single fix for an issue in nbd introduced in this cycle" * tag 'for-linus-20191121' of git://git.kernel.dk/linux-block: nbd:fix memory leak in nbd_get_socket()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/nbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index a94ee45440b3..19e75999bb15 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -993,6 +993,7 @@ static struct socket *nbd_get_socket(struct nbd_device *nbd, unsigned long fd,
if (sock->ops->shutdown == sock_no_shutdown) {
dev_err(disk_to_dev(nbd->disk), "Unsupported socket: shutdown callout must be supported.\n");
*err = -EINVAL;
+ sockfd_put(sock);
return NULL;
}