Message ID | 1478083203-9465-1-git-send-email-ashijeetacharya@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Am 02.11.2016 um 11:40 hat Ashijeet Acharya geschrieben: > This patch frees the leaked visitor in nbd_refresh_filename() and uses > visit_free() to fix it. The leak was introduced by the commit 491d6c7. > > Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> > Reviewed-by: Eric Blake <eblake@redhat.com> Thanks, applied to the block branch. Kevin
diff --git a/block/nbd.c b/block/nbd.c index 8ef1438..d656eb1 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -534,6 +534,7 @@ static void nbd_refresh_filename(BlockDriverState *bs, QDict *options) ov = qobject_output_visitor_new(&saddr_qdict); visit_type_SocketAddress(ov, NULL, &s->saddr, &error_abort); visit_complete(ov, &saddr_qdict); + visit_free(ov); assert(qobject_type(saddr_qdict) == QTYPE_QDICT); qdict_put_obj(opts, "server", saddr_qdict);