qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PULL 01/12] block/nbd: Fix the leaked visitor


From: Kevin Wolf
Subject: [Qemu-block] [PULL 01/12] block/nbd: Fix the leaked visitor
Date: Fri, 11 Nov 2016 17:55:00 +0100

From: Ashijeet Acharya <address@hidden>

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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 block/nbd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/nbd.c b/block/nbd.c
index 9cff839..35f24be 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);
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]