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:
parent
2718a3d836
commit
aee70b7482
@ -1004,6 +1004,7 @@ static virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||
|
||||
if (vboxDomainCreate(dom) < 0) {
|
||||
vboxDomainUndefine(dom);
|
||||
virUnrefDomain(dom);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user