1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

vbox_tmpl.c: don't leak a domain pointer upon failure to create

* src/vbox/vbox_tmpl.c (vboxDomainCreateXML): "Unref" the domain
upon failure.  Patch by Matthias Bolte.
This commit is contained in:
Jim Meyering 2010-01-05 17:45:46 +01:00
parent 2718a3d836
commit aee70b7482

View File

@ -1004,6 +1004,7 @@ static virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
if (vboxDomainCreate(dom) < 0) {
vboxDomainUndefine(dom);
virUnrefDomain(dom);
return NULL;
}