* [Qemu-devel] [PATCH v3] block/nbd: Fix the leaked visitor
@ 2016-11-02 10:40 Ashijeet Acharya
2016-11-02 10:53 ` Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Ashijeet Acharya @ 2016-11-02 10:40 UTC (permalink / raw)
To: kwolf; +Cc: mreitz, pbonzini, eblake, qemu-devel, qemu-block,
Ashijeet Acharya
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>
---
Changes in v3:
- Modify the Subject line
- Free the visitor immediately after visit_complete()
---
block/nbd.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v3] block/nbd: Fix the leaked visitor
2016-11-02 10:40 [Qemu-devel] [PATCH v3] block/nbd: Fix the leaked visitor Ashijeet Acharya
@ 2016-11-02 10:53 ` Kevin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2016-11-02 10:53 UTC (permalink / raw)
To: Ashijeet Acharya; +Cc: mreitz, pbonzini, eblake, qemu-devel, qemu-block
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-02 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 10:40 [Qemu-devel] [PATCH v3] block/nbd: Fix the leaked visitor Ashijeet Acharya
2016-11-02 10:53 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).