Re: [PATCH] Fix memory leak in virNetClientIOWriteMessage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18.02.2013 12:01, Sergey Fionov wrote:
> Commit 18937c3ae0990b4417a43aa07a2c35aaf8cb6ec2 introduced the
> memory leak when client->msg.fds is moved to thecall->msg
> and then never freed.
> ---
> Hello,
> Please ignore previous patch with incorrent formatting.
> 
>  src/rpc/virnetclient.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
> index 4efa578..bfa1624 100644
> --- a/src/rpc/virnetclient.c
> +++ b/src/rpc/virnetclient.c
> @@ -1182,6 +1182,7 @@ virNetClientIOWriteMessage(virNetClientPtr client,
>          }
>          thecall->msg->donefds = 0;
>          thecall->msg->bufferOffset = thecall->msg->bufferLength = 0;
> +        VIR_FREE(thecall->msg->fds);
>          VIR_FREE(thecall->msg->buffer);
>          if (thecall->expectReply)
>              thecall->mode = VIR_NET_CLIENT_MODE_WAIT_RX;
> 

ACKed and pushed. Fortunately, the commit that introduced this is not
present in any of our stable branches, so we don't need to backport it.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]