Skip to content

Commit

Permalink
block/nbd: nbd_client_handshake(): fix leak of s->ioc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and ebblake committed Jun 15, 2021
1 parent dd84c63 commit 3d44d66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/nbd.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3d44d66

Please sign in to comment.