[libvirt] [PATCH 14/19] qemu_driver: Resolve Coverity RESOURCE_LEAK

John Ferlan jferlan at redhat.com
Wed Aug 27 20:54:45 UTC 2014


Coverity found that the 'buf' wasn't VIR_FREE'd at exit.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/qemu/qemu_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 73959da..323957e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10516,6 +10516,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
     }
 
  cleanup:
+    VIR_FREE(buf);
     VIR_FREE(alias);
     virStorageSourceFree(meta);
     VIR_FORCE_CLOSE(fd);
-- 
1.9.3




More information about the libvir-list mailing list