提交 45794677 编写于 作者: M Mark McLoughlin

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
上级 458344c9
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,12 +1247,14 @@ 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");
qemudFreeVM(vm);
if (newVM)
qemudFreeVM(vm);
return NULL;
}
if (qemudSaveConfig(server, vm) < 0) {
qemudFreeVM(vm);
if (newVM)
qemudFreeVM(vm);
return NULL;
}
} else {
......@@ -1587,12 +1589,14 @@ 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");
qemudFreeNetwork(network);
if (newNetwork)
qemudFreeNetwork(network);
return NULL;
}
if (qemudSaveNetworkConfig(server, network) < 0) {
qemudFreeNetwork(network);
if (newNetwork)
qemudFreeNetwork(network);
return NULL;
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册