From: Roman Kagan <rvka...@yandex-team.ru> nbd_free_connect_thread leaks the channel object if it hasn't been stolen.
Unref it and fix the leak. Signed-off-by: Roman Kagan <rvka...@yandex-team.ru> Reviewed-by: Eric Blake <ebl...@redhat.com> --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 616f9ae6c4..f4b3407587 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -381,6 +381,7 @@ static void nbd_free_connect_thread(NBDConnectThread *thr) { if (thr->sioc) { qio_channel_close(QIO_CHANNEL(thr->sioc), NULL); + object_unref(OBJECT(thr->sioc)); } error_free(thr->err); qapi_free_SocketAddress(thr->saddr); -- 2.29.2