diff options
author | Ashijeet Acharya <ashijeetacharya@gmail.com> | 2016-11-02 16:10:03 +0530 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-11-11 15:54:55 +0100 |
commit | a1d4e38a8b01a6699355c31867d524f8d4cd480e (patch) | |
tree | 601fd60c1d13fabfd85d18a71d7ea5e3edbfe624 | |
parent | 6bbcb76301a72dc80c8d29af13d40bb9a759c9c6 (diff) |
block/nbd: Fix the leaked visitor
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>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/nbd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/nbd.c b/block/nbd.c index 9cff8396f9..35f24be069 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -536,6 +536,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); |