mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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:
parent
8a75cc4fcc
commit
3c3c3e3613
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user