[libvirt] [PATCH] qemu: agent: fix potential leak in qemuAgentGetFSInfo()

Jonathon Jongsma jjongsma at redhat.com
Wed Aug 28 18:48:14 UTC 2019


On error paths, info_ret could potentially leak. Make sure it's freed.
---
Thanks to John Ferlan for the catch. Apparently this got missed before the
patch was merged

 src/qemu/qemu_agent.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index c63db968c6..a4113460bd 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -2208,6 +2208,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon,
             virDomainFSInfoFree(info_ret[i]);
     }
     VIR_FREE(agentinfo);
+    VIR_FREE(info_ret);
     return ret;
 }
 
-- 
2.21.0




More information about the libvir-list mailing list