]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Tue, 8 Sep 2015 11:12:52 +0000 (07:12 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 24 Sep 2015 13:53:38 +0000 (09:53 -0400)
In the error path need to unref the 'caps' as well

Signed-off-by: John Ferlan <jferlan@redhat.com>
tests/qemucaps2xmltest.c

index 6a5811c6c849fdcc00326cdcce2c4e28ab2031d1..7adde24699eab160e33e359e4f72a5850a73a8f0 100644 (file)
@@ -113,6 +113,7 @@ testGetCaps(char *capsData, const testQemuData *data)
 
  error:
     virObjectUnref(qemuCaps);
+    virObjectUnref(caps);
     return NULL;
 }