]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rpc: use virNetMessageClearPayload in client
authorCole Robinson <crobinso@redhat.com>
Wed, 27 Apr 2016 22:02:22 +0000 (18:02 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 5 May 2016 18:28:19 +0000 (14:28 -0400)
commitb6238738ea9cad9e41ed94ce2f45bd8be74ef306
tree230741c485393b72171d9017b787302074381de6
parent64bd680d42a328229ffbbb1efbad241cd0223196
rpc: use virNetMessageClearPayload in client

This removes the opencoded payload freeing in the client, to use
the shared virNetMessageClearPayload call. Two changes:

- ClearPayload sets nfds=0, which fixes a potential crash if
  an error path called virNetMessageFree/Clear on the message
  after fds was free'd
- We drop the inner loop VIR_FORCE_CLOSE... this may mean fds are
  kept open a little bit longer if the call is blocking but in
  practice I don't think it will have any effect
src/libvirt_remote.syms
src/rpc/virnetclient.c
src/rpc/virnetmessage.c
src/rpc/virnetmessage.h