Fix memory leak in virNetClientIOWriteMessage

Commit 18937c3ae0 introduced the
memory leak when client->msg.fds is copied to thecall->msg
and then never freed.
This commit is contained in:
Sergey Fionov
2013-02-20 17:56:35 +01:00
committed by Michal Privoznik
parent d0172d2b1b
commit 1d8193ee8a
+1
View File
@@ -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;