[PATCH 3/4] rpc: Clear more in virNetMessageClearPayload

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

 



Set all counters to 0. This doesn't impact current users, but
future users will want this
---
 src/rpc/virnetmessage.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c
index 3df502a..673fb8d 100644
--- a/src/rpc/virnetmessage.c
+++ b/src/rpc/virnetmessage.c
@@ -56,7 +56,13 @@ virNetMessageClearPayload(virNetMessagePtr msg)
 
     for (i = 0; i < msg->nfds; i++)
         VIR_FORCE_CLOSE(msg->fds[i]);
+
+    msg->donefds = 0;
+    msg->nfds = 0;
     VIR_FREE(msg->fds);
+
+    msg->bufferOffset = 0;
+    msg->bufferLength = 0;
     VIR_FREE(msg->buffer);
 }
 
-- 
2.7.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]