1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

Avoid a leak in xenDaemonLookupByID

* src/xend_internal.c: free name in xenDaemonLookupByID() if
  virGetDomain() fails
This commit is contained in:
Matthias Bolte 2009-09-08 14:42:10 +02:00 committed by Daniel Veillard
parent f125d3265a
commit 1128cc939d

View File

@ -3723,7 +3723,7 @@ xenDaemonLookupByID(virConnectPtr conn, int id) {
}
ret = virGetDomain(conn, name, uuid);
if (ret == NULL) return NULL;
if (ret == NULL) goto error;
ret->id = id;
VIR_FREE(name);