mirror of https://gitee.com/openkylin/libvirt.git
virsh: domain: Clean up handling of "dom" in "save" command
This commit is contained in:
parent
bc068034ba
commit
e22c5c57ee
|
@ -3887,7 +3887,8 @@ doSave(void *opaque)
|
|||
out:
|
||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||
out_sig:
|
||||
if (dom) virDomainFree(dom);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
VIR_FREE(xml);
|
||||
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
||||
}
|
||||
|
@ -4051,8 +4052,7 @@ cmdSave(vshControl *ctl, const vshCmd *cmd)
|
|||
vshPrint(ctl, _("\nDomain %s saved to %s\n"), name, to);
|
||||
|
||||
cleanup:
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
virDomainFree(dom);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue