[PATCH] client: Free message when freeing client

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

 



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);

-- 
1.7.8.6

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