commit | 97ffb770da162ef71cfc34f9ce4b9542fd2134e1 | [log] [tgz] |
---|---|---|
author | Sun Ke <sunke32@huawei.com> | Tue Nov 19 14:09:11 2019 +0800 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Sun Dec 01 09:13:13 2019 +0100 |
tree | 3a3685534abc85f4a74786b9dd8f6c8c14b8672c | |
parent | f71e52cb3270653090cda296b2da02c010aea790 [diff] |
nbd:fix memory leak in nbd_get_socket() commit dff10bbea4be47bdb615b036c834a275b7c68133 upstream. Before returning NULL, put the sock first. Cc: stable@vger.kernel.org Fixes: cf1b2326b734 ("nbd: verify socket is supported during setup") Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Sun Ke <sunke32@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>