mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
Avoid a leak in xenDaemonLookupByID
* src/xend_internal.c: free name in xenDaemonLookupByID() if virGetDomain() fails
This commit is contained in:
parent
f125d3265a
commit
1128cc939d
@ -3723,7 +3723,7 @@ xenDaemonLookupByID(virConnectPtr conn, int id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = virGetDomain(conn, name, uuid);
|
ret = virGetDomain(conn, name, uuid);
|
||||||
if (ret == NULL) return NULL;
|
if (ret == NULL) goto error;
|
||||||
|
|
||||||
ret->id = id;
|
ret->id = id;
|
||||||
VIR_FREE(name);
|
VIR_FREE(name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user