提交 f2ac23f2 编写于 作者: P Peter Krempa

qemu: hotplug: Use VIR_AUTOFREE in qemuDomainAttachDiskGeneric

Get rid of the last manually freed var.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 5ef886e9
......@@ -613,7 +613,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
VIR_AUTOPTR(qemuBlockStorageSourceChainData) data = NULL;
int ret = -1;
qemuDomainObjPrivatePtr priv = vm->privateData;
char *devstr = NULL;
VIR_AUTOFREE(char *) devstr = NULL;
VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = virQEMUDriverGetConfig(driver);
VIR_AUTOPTR(virJSONValue) corProps = NULL;
VIR_AUTOFREE(char *) corAlias = NULL;
......@@ -679,7 +679,6 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
cleanup:
qemuDomainSecretDiskDestroy(disk);
VIR_FREE(devstr);
return ret;
exit_monitor:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册