mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
admin_server: fix memory leak
If caller of adminConnectListServers() pass NULL instead of servers we need to free the list we've received from virNetDaemonGetServers(). Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
9b48ef9c51
commit
68b726b93c
@ -54,6 +54,7 @@ adminConnectListServers(virNetDaemonPtr dmn,
|
|||||||
srvs = NULL;
|
srvs = NULL;
|
||||||
}
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
|
virObjectListFreeCount(srvs, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user