]> xenbits.xensource.com Git - libvirt.git/commit
rpc: handle param_int, plug memory leaks
authorEric Blake <eblake@redhat.com>
Tue, 20 Dec 2011 15:22:25 +0000 (08:22 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 20 Dec 2011 15:41:10 +0000 (08:41 -0700)
commit4e394dea1f3a1cd4f4f6637ed91c9f7b367800c0
tree631c210e202e45b0056c031dee51e3fdaa14fcaa
parentf8616336a3bd3ced66c377e272856f3df11f4535
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.
(remoteDispatchDomainGetSchedulerParameters)
(remoteDispatchDomainGetSchedulerParametersFlags)
(remoteDispatchDomainBlockStatsFlags)
(remoteDispatchDomainGetMemoryParameters): Don't leak strings.
* src/rpc/genprotocol.pl: Don't nuke member-usage of 'buf' or 'i'.
daemon/remote.c
src/rpc/genprotocol.pl