mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-07 09:19:19 +00:00
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:
|
out:
|
||||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||||
out_sig:
|
out_sig:
|
||||||
if (dom) virDomainFree(dom);
|
if (dom)
|
||||||
|
virDomainFree(dom);
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
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);
|
vshPrint(ctl, _("\nDomain %s saved to %s\n"), name, to);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
virDomainFree(dom);
|
||||||
virDomainFree(dom);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user