[PATCH] rpc: Fix memory leak of fds

Michal Prívozník mprivozn at redhat.com
Fri Mar 4 09:58:34 UTC 2022


On 3/2/22 10:22, Peng Liang wrote:
> 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 at huawei.com>
> Signed-off-by: Peng Liang <liangpeng10 at huawei.com>
> ---
>  src/rpc/virnetserver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

and pushed.

Michal




More information about the libvir-list mailing list