[PATCH] Fix memory leak in virNetClientIOWriteMessage

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

 



Commit 18937c3ae0990b4417a43aa07a2c35aaf8cb6ec2 introduced the
memory leak when client->msg.fds is copied to thecall->msg
and then never freed.
---
 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;
--
1.7.10.4


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