mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03: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);
|
||||
if (ret == NULL) return NULL;
|
||||
if (ret == NULL) goto error;
|
||||
|
||||
ret->id = id;
|
||||
VIR_FREE(name);
|
||||
|
Loading…
Reference in New Issue
Block a user