]> xenbits.xensource.com Git - libvirt.git/commitdiff
Unref the cfg in qemuDomainAttachHostPCIDevice()
authorShivaprasad G Bhat <shivaprasadbhat@gmail.com>
Wed, 25 May 2016 08:47:12 +0000 (03:47 -0500)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 25 May 2016 10:24:28 +0000 (12:24 +0200)
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
src/qemu/qemu_hotplug.c

index 807aaf8864c8f81a7b71f7286a76a402e9a58063..41a0e4f9b86e7abbfdfbc9ab4da4ffa2603bada3 100644 (file)
@@ -1164,7 +1164,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
     unsigned int flags = 0;
 
     if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0)
-        return -1;
+        goto cleanup;
 
     if (!cfg->relaxedACS)
         flags |= VIR_HOSTDEV_STRICT_ACS_CHECK;