mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05: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:
@@ -1004,6 +1004,7 @@ static virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||
|
||||
if (vboxDomainCreate(dom) < 0) {
|
||||
vboxDomainUndefine(dom);
|
||||
virUnrefDomain(dom);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user