[PATCH] client: fix memory leak in client msg

Ján Tomko jtomko at redhat.com
Wed Sep 9 13:04:05 UTC 2020


On a Thursday in 2020, Hao Wang wrote:
>>From 3ad3fae4f2562a11bef8dcdd25b6a7e0b00d4e2c Mon Sep 17 00:00:00 2001
>From: Hao Wang <wanghao232 at huawei.com>
>Date: Sat, 18 Jul 2020 15:43:30 +0800
>Subject: [PATCH] client: fix memory leak in client msg
>
>When closing client->waitDispatch in virNetClientIOEventLoopRemoveAll
>or virNetClientIOEventLoopRemoveDone, VIR_FREE() is called to free
>call->msg directly, resulting in leak of the memory call->msg->buffer
>points to.
>Use virNetMessageFree(call->msg) instead of VIR_FREE(call->msg).
>
>Signed-off-by: Hao Wang <wanghao232 at huawei.com>
>---
> src/rpc/virnetclient.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200909/22475545/attachment-0001.sig>


More information about the libvir-list mailing list