Re: [PATCH] client: Free message when freeing client

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

 



On Fri, Aug 03, 2012 at 05:32:59PM +0200, Peter Krempa wrote:
> The last message of the client was not freed leaking 4 bytes of memory
> in the client when the remote daemon crashed while processing a message.
> ---
>  src/rpc/virnetclient.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
> index b210a72..cb373b6 100644
> --- a/src/rpc/virnetclient.c
> +++ b/src/rpc/virnetclient.c
> @@ -499,6 +499,9 @@ void virNetClientFree(virNetClientPtr client)
>  #if HAVE_SASL
>      virNetSASLSessionFree(client->sasl);
>  #endif
> +
> +    virNetMessageClear(&client->msg);
> +
>      virNetClientUnlock(client);
>      virMutexDestroy(&client->lock);

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]