qemuDomainObjPrivatePtr priv = vm->privateData;
g_autoptr(virDomainDef) vmdef = NULL;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
- virDomainDeviceDefPtr devConf = NULL;
+ g_autoptr(virDomainDeviceDef) devConf = NULL;
virDomainDeviceDef devConfSave = { 0 };
- virDomainDeviceDefPtr devLive = NULL;
+ g_autoptr(virDomainDeviceDef) devLive = NULL;
int ret = -1;
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
ret = 0;
cleanup:
- virDomainDeviceDefFree(devConf);
- virDomainDeviceDefFree(devLive);
-
return ret;
}
virDomainObjPtr vm = NULL;
qemuDomainObjPrivatePtr priv;
g_autoptr(virDomainDef) vmdef = NULL;
- virDomainDeviceDefPtr dev = NULL, dev_copy = NULL;
+ g_autoptr(virDomainDeviceDef) dev = NULL;
+ virDomainDeviceDefPtr dev_copy = NULL;
bool force = (flags & VIR_DOMAIN_DEVICE_MODIFY_FORCE) != 0;
int ret = -1;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
cleanup:
if (dev != dev_copy)
virDomainDeviceDefFree(dev_copy);
- virDomainDeviceDefFree(dev);
virDomainObjEndAPI(&vm);
virNWFilterUnlockFilterUpdates();
return ret;
{
qemuDomainObjPrivatePtr priv = vm->privateData;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
- virDomainDeviceDefPtr dev = NULL, dev_copy = NULL;
+ g_autoptr(virDomainDeviceDef) dev = NULL;
+ virDomainDeviceDefPtr dev_copy = NULL;
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE;
g_autoptr(virDomainDef) vmdef = NULL;
int ret = -1;
cleanup:
if (dev != dev_copy)
virDomainDeviceDefFree(dev_copy);
- virDomainDeviceDefFree(dev);
return ret;
}