diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 48201c1..35ce32e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -603,6 +603,11 @@ qemuDomainFindMaxID(void *payload, *driver_maxid = vm->def->id + 1; } +static void +qemuSharedDiskFree(void *entry, const void *name ATTRIBUTE_UNUSED) +{ + VIR_FREE(entry); +} /** * qemuStartup: @@ -810,7 +815,7 @@ qemuStartup(bool privileged, if ((qemu_driver->inactivePciHostdevs = pciDeviceListNew()) == NULL) goto error; - if (!(qemu_driver->sharedDisks = virHashCreate(30, NULL))) + if (!(qemu_driver->sharedDisks = virHashCreate(30, qemuSharedDiskFree))) goto error; if (privileged) {