[PATCH 2/6] tests: Resolve Coverity RESOURCE_LEAK

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

 



In the error path need to unref the 'caps' as well

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 tests/qemucaps2xmltest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c
index 6a5811c..7adde24 100644
--- a/tests/qemucaps2xmltest.c
+++ b/tests/qemucaps2xmltest.c
@@ -113,6 +113,7 @@ testGetCaps(char *capsData, const testQemuData *data)
 
  error:
     virObjectUnref(qemuCaps);
+    virObjectUnref(caps);
     return NULL;
 }
 
-- 
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]