]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Resolve Coverity RESOURCE_LEAK
authorWang Rui <moon.wangrui@huawei.com>
Thu, 28 Aug 2014 10:20:56 +0000 (18:20 +0800)
committerJán Tomko <jtomko@redhat.com>
Thu, 28 Aug 2014 10:52:42 +0000 (12:52 +0200)
Coverity determined that 'conflict' would be leaked.

Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
src/util/virpci.c

index 0098d6c47215324e024676e919dd463a81b53fa1..f1d4499f8bbd979bd34b7bd8c2319aaefc150c25 100644 (file)
@@ -801,6 +801,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevicePtr dev,
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Active %s devices on bus with %s, not doing bus reset"),
                        conflict->name, dev->name);
+        virPCIDeviceFree(conflict);
         return -1;
     }