mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
committed by
Michal Privoznik
parent
d0172d2b1b
commit
1d8193ee8a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user