mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
rpc: Fix memory leak of fds
In virSystemdActivationClaimFDs, the memory of ent->fds has been stolen and stored in fds, but fds is never freed, which causes a memory leak. Fix it by declaring fds as g_autofree. Reported-by: Jie Tang <tangjie18@huawei.com> Signed-off-by: Peng Liang <liangpeng10@huawei.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
cac9608c17
commit
8a1915c4d6
@ -655,7 +655,7 @@ virNetServerAddServiceActivation(virNetServer *srv,
|
||||
size_t max_queued_clients,
|
||||
size_t nrequests_client_max)
|
||||
{
|
||||
int *fds;
|
||||
g_autofree int *fds = NULL;
|
||||
size_t nfds;
|
||||
|
||||
if (act == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user