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

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

 



On error paths, info_ret could potentially leak. Make sure it's freed.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux