aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-06-10 13:07:38 +0300
committerEric Blake <eblake@redhat.com>2021-06-18 10:59:53 -0500
commit2a25def4be09714c543713f111813b521b2356ee (patch)
tree3884fc900928d14a14b136310255273e9aa83ff2 /block
parente8b35bf5dc8d4e98d91855a9c7b2ed905c8e6888 (diff)
downloadqemu-2a25def4be09714c543713f111813b521b2356ee.zip
qemu-2a25def4be09714c543713f111813b521b2356ee.tar.gz
qemu-2a25def4be09714c543713f111813b521b2356ee.tar.bz2
block/nbd: nbd_client_handshake(): fix leak of s->ioc
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Roman Kagan <rvkagan@yandex-team.ru> Message-Id: <20210610100802.5888-9-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/nbd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/nbd.c b/block/nbd.c
index 08ae47d..77b85ca 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -1889,6 +1889,8 @@ static int nbd_client_handshake(BlockDriverState *bs, Error **errp)
nbd_yank, bs);
object_unref(OBJECT(s->sioc));
s->sioc = NULL;
+ object_unref(OBJECT(s->ioc));
+ s->ioc = NULL;
return ret;
}