From: Shivaprasad G Bhat Date: Wed, 25 May 2016 08:47:12 +0000 (-0500) Subject: Unref the cfg in qemuDomainAttachHostPCIDevice() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a24cdf6cf73673b759530a5e723c0d9337fba8d7;p=libvirt.git Unref the cfg in qemuDomainAttachHostPCIDevice() Signed-off-by: Shivaprasad G Bhat --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 807aaf8864..41a0e4f9b8 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -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;