mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +00:00
Fri Feb 20 19:07:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't free active networks/vms if we fail to save the new config
This commit is contained in:
parent
458344c94e
commit
4579467783
@ -1,3 +1,8 @@
|
||||
Fri Feb 20 19:07:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||
|
||||
* qemud/conf.c: don't free active networks/vms if we
|
||||
fail to save the new config
|
||||
|
||||
Fri Feb 20 18:25:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||
|
||||
* virsh.c: cmdNetworkList() re-indent this.
|
||||
|
@ -1247,11 +1247,13 @@ struct qemud_vm *qemudLoadConfigXML(struct qemud_server *server,
|
||||
if (qemudMakeConfigPath(server->configDir, vm->def->name, ".xml", vm->configFile, PATH_MAX) < 0) {
|
||||
qemudReportError(server, VIR_ERR_INTERNAL_ERROR,
|
||||
"cannot construct config file path");
|
||||
if (newVM)
|
||||
qemudFreeVM(vm);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (qemudSaveConfig(server, vm) < 0) {
|
||||
if (newVM)
|
||||
qemudFreeVM(vm);
|
||||
return NULL;
|
||||
}
|
||||
@ -1587,11 +1589,13 @@ struct qemud_network *qemudLoadNetworkConfigXML(struct qemud_server *server,
|
||||
if (save) {
|
||||
if (qemudMakeConfigPath(server->networkConfigDir, network->def->name, ".xml", network->configFile, PATH_MAX) < 0) {
|
||||
qemudReportError(server, VIR_ERR_INTERNAL_ERROR, "cannot construct config file path");
|
||||
if (newNetwork)
|
||||
qemudFreeNetwork(network);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (qemudSaveNetworkConfig(server, network) < 0) {
|
||||
if (newNetwork)
|
||||
qemudFreeNetwork(network);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user