1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-27 18:03:50 +03:00

Fix memory leak in virNetClientIOWriteMessage

Commit 18937c3ae0990b4417a43aa07a2c35aaf8cb6ec2 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-17 18:20:59 +04:00 committed by Michal Privoznik
parent d0172d2b1b
commit 1d8193ee8a

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;