virpcimock: Fix memory leak in pci_driver_new

driverpath, allocated by virAsprintfQuiet, was not freed and leaked.

Signed-off-by: Zhipeng Lu <lu.zhipeng@zte.com.cn>
This commit is contained in:
ZhiPeng Lu 2017-07-15 11:35:36 +08:00 committed by Laine Stump
parent 8a75cc4fcc
commit 3c3c3e3613

View File

@ -511,6 +511,8 @@ pci_driver_new(const char *name, int fail, ...)
if (VIR_APPEND_ELEMENT_QUIET(pciDrivers, nPCIDrivers, driver) < 0)
ABORT_OOM();
VIR_FREE(driverpath);
}
static struct pciDriver *