[libvirt] [PATCH] rpc: Fix memleak in virNetMessageEncodeHeader

Eric Blake eblake at redhat.com
Mon Jun 11 13:20:50 UTC 2012


On 06/11/2012 06:28 AM, Michal Privoznik wrote:
> My latest patch for RPC rework (a2c304f6872) introduced a memory leak.
> virNetMessageEncodeHeader() is calling VIR_ALLOC_N(msg->buffer, ...)
> despite fact, that msg->buffer isn't VIR_FREE()'d on all paths calling
> the function. Therefore, rather than injecting free statement switch to
> VIR_REALLOC_N().
> ---
>  src/rpc/virnetmessage.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120611/942c4748/attachment-0001.sig>


More information about the libvir-list mailing list