mirror of https://gitee.com/openkylin/libvirt.git
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