提交 2de3df85 编写于 作者: J Ján Tomko

qemuDomainAttachNetDevice: use only one virErrorPtr variable

Commit f7b55665 added 'save_error' even though the function
already has 'originalError' used in the 'try_remove' section.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 ca0ab9cd
......@@ -1205,7 +1205,6 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
bool charDevPlugged = false;
bool netdevPlugged = false;
char *netdev_name;
virErrorPtr save_error = NULL;
/* preallocate new slot for device */
if (VIR_REALLOC_N(vm->def->nets, vm->def->nnets + 1) < 0)
......@@ -1487,9 +1486,9 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
qemuDomainReleaseDeviceAddress(vm, &net->info, NULL);
if (iface_connected) {
virErrorPreserveLast(&save_error);
virErrorPreserveLast(&originalError);
virDomainConfNWFilterTeardown(net);
virErrorRestore(&save_error);
virErrorRestore(&originalError);
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
ignore_value(virNetDevMacVLanDeleteWithVPortProfile(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册