Skip to content

Commit be5fa3a

Browse files
committed
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()
2 parents cec353f + dff10bb commit be5fa3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/block/nbd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,7 @@ static struct socket *nbd_get_socket(struct nbd_device *nbd, unsigned long fd,
993993
if (sock->ops->shutdown == sock_no_shutdown) {
994994
dev_err(disk_to_dev(nbd->disk), "Unsupported socket: shutdown callout must be supported.\n");
995995
*err = -EINVAL;
996+
sockfd_put(sock);
996997
return NULL;
997998
}
998999

0 commit comments

Comments
 (0)