[libvirt] [PATCHv5 1/9] Fix a bug related to VIR_TYPED_PARAM_STRING

Eric Blake eblake at redhat.com
Tue Dec 20 15:50:44 UTC 2011

On 12/20/2011 01:34 AM, Hu Tao wrote:
> From: Eric Blake <eblake at redhat.com>
> https://www.redhat.com/archives/libvir-list/2011-December/msg00854.html
> ---
>  daemon/remote.c |   22 ++++++++++------------
>  1 files changed, 10 insertions(+), 12 deletions(-)

I'll take your re-posting of my patch as an ACK, and pushing this along
with my genprotocol.pl fix squashed in.  The commit message is now:

commit 4e394dea1f3a1cd4f4f6637ed91c9f7b367800c0
Author: Eric Blake <eblake at redhat.com>
Date:   Tue Dec 20 08:22:25 2011 -0700

    rpc: handle param_int, plug memory leaks

    The RPC code had several latent memory leaks and an attempt to
    free the wrong string, but thankfully nothing triggered them
    (blkiotune was the only one returning a string, and always as
    the last parameter).  Also, our cleanups for rpcgen ended up
    nuking a line of code that renders VIR_TYPED_PARAM_INT broken,
    because it was the only use of 'i' in a function, even though
    it was a member usage rather than a standalone declaration.

    * daemon/remote.c (remoteSerializeTypedParameters): Free the
    correct array element.
    (remoteDispatchDomainGetMemoryParameters): Don't leak strings.
    * src/rpc/genprotocol.pl: Don't nuke member-usage of 'buf' or 'i'.

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/20111220/4bec9739/attachment-0001.sig>

More information about the libvir-list mailing list