mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +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>
|
Fri Feb 20 18:25:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
* virsh.c: cmdNetworkList() re-indent this.
|
* virsh.c: cmdNetworkList() re-indent this.
|
||||||
|
12
qemud/conf.c
12
qemud/conf.c
@ -1247,12 +1247,14 @@ struct qemud_vm *qemudLoadConfigXML(struct qemud_server *server,
|
|||||||
if (qemudMakeConfigPath(server->configDir, vm->def->name, ".xml", vm->configFile, PATH_MAX) < 0) {
|
if (qemudMakeConfigPath(server->configDir, vm->def->name, ".xml", vm->configFile, PATH_MAX) < 0) {
|
||||||
qemudReportError(server, VIR_ERR_INTERNAL_ERROR,
|
qemudReportError(server, VIR_ERR_INTERNAL_ERROR,
|
||||||
"cannot construct config file path");
|
"cannot construct config file path");
|
||||||
qemudFreeVM(vm);
|
if (newVM)
|
||||||
|
qemudFreeVM(vm);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemudSaveConfig(server, vm) < 0) {
|
if (qemudSaveConfig(server, vm) < 0) {
|
||||||
qemudFreeVM(vm);
|
if (newVM)
|
||||||
|
qemudFreeVM(vm);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1587,12 +1589,14 @@ struct qemud_network *qemudLoadNetworkConfigXML(struct qemud_server *server,
|
|||||||
if (save) {
|
if (save) {
|
||||||
if (qemudMakeConfigPath(server->networkConfigDir, network->def->name, ".xml", network->configFile, PATH_MAX) < 0) {
|
if (qemudMakeConfigPath(server->networkConfigDir, network->def->name, ".xml", network->configFile, PATH_MAX) < 0) {
|
||||||
qemudReportError(server, VIR_ERR_INTERNAL_ERROR, "cannot construct config file path");
|
qemudReportError(server, VIR_ERR_INTERNAL_ERROR, "cannot construct config file path");
|
||||||
qemudFreeNetwork(network);
|
if (newNetwork)
|
||||||
|
qemudFreeNetwork(network);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemudSaveNetworkConfig(server, network) < 0) {
|
if (qemudSaveNetworkConfig(server, network) < 0) {
|
||||||
qemudFreeNetwork(network);
|
if (newNetwork)
|
||||||
|
qemudFreeNetwork(network);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user