mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
src/openvz_driver.c: Fix segfault in OpenVZ driver
(Evgeniy Sokolov).
This commit is contained in:
parent
bf347f5af0
commit
a0208e6635
@ -1,3 +1,8 @@
|
|||||||
|
Wed Sep 17 17:02:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
|
* src/openvz_driver.c: Fix segfault in OpenVZ driver
|
||||||
|
(Evgeniy Sokolov).
|
||||||
|
|
||||||
Wed Sep 17 16:38:00 BST 2008 Daniel P berrange <berrange@redhat.com>
|
Wed Sep 17 16:38:00 BST 2008 Daniel P berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml,
|
* tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml,
|
||||||
|
@ -436,9 +436,10 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
|
|||||||
|
|
||||||
vm = virDomainFindByName(driver->domains, vmdef->name);
|
vm = virDomainFindByName(driver->domains, vmdef->name);
|
||||||
if (vm) {
|
if (vm) {
|
||||||
virDomainDefFree(vmdef);
|
openvzError(conn, VIR_ERR_OPERATION_FAILED,
|
||||||
openvzLog(OPENVZ_ERR, _("Already an OPENVZ VM active with the id '%s'"),
|
_("Already an OPENVZ VM active with the id '%s'"),
|
||||||
vmdef->name);
|
vmdef->name);
|
||||||
|
virDomainDefFree(vmdef);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!(vm = virDomainAssignDef(conn, &driver->domains, vmdef))) {
|
if (!(vm = virDomainAssignDef(conn, &driver->domains, vmdef))) {
|
||||||
@ -512,10 +513,10 @@ openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
|
|||||||
|
|
||||||
vm = virDomainFindByName(driver->domains, vmdef->name);
|
vm = virDomainFindByName(driver->domains, vmdef->name);
|
||||||
if (vm) {
|
if (vm) {
|
||||||
|
openvzError(conn, VIR_ERR_OPERATION_FAILED,
|
||||||
|
_("Already an OPENVZ VM defined with the id '%s'"),
|
||||||
|
vmdef->name);
|
||||||
virDomainDefFree(vmdef);
|
virDomainDefFree(vmdef);
|
||||||
openvzLog(OPENVZ_ERR,
|
|
||||||
_("Already an OPENVZ VM defined with the id '%d'"),
|
|
||||||
strtoI(vmdef->name));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!(vm = virDomainAssignDef(conn, &driver->domains, vmdef))) {
|
if (!(vm = virDomainAssignDef(conn, &driver->domains, vmdef))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user