[PATCH] qemu: Resolve Coverity RESOURCE_LEAK

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

 



Commit id '15fa84acb' added the alias fetch, but forgot to free it.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 Pushing as trivial 

 src/qemu/qemu_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b6e05fa..2b530c8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11805,7 +11805,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
     int rc;
     virHashTablePtr stats = NULL;
     qemuBlockStats *entry;
-    char *alias;
+    char *alias = NULL;
 
     virCheckFlags(0, -1);
 
@@ -11891,6 +11891,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
  endjob:
     qemuDomainObjEndJob(driver, vm);
  cleanup:
+    VIR_FREE(alias);
     virHashFree(stats);
     virDomainObjEndAPI(&vm);
     virObjectUnref(cfg);
-- 
2.1.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]