nbd:fix memory leak in nbd_get_socket()
Before returning NULL, put the sock first. Cc: stable@vger.kernel.org Fixes: cf1b2326 ("nbd: verify socket is supported during setup") Reviewed-by: NJosef Bacik <josef@toxicpanda.com> Reviewed-by: NMike Christie <mchristi@redhat.com> Signed-off-by: NSun Ke <sunke32@huawei.com> Signed-off-by: NJens Axboe <axboe@kernel.dk>
Showing
想要评论请 注册 或 登录