[libvirt] [PATCHv4 3/6] Add virDomain{S, G}etInterfaceparameters support to the remote driver

Eric Blake eblake at redhat.com
Sat Dec 31 19:04:49 UTC 2011


On 12/29/2011 12:33 AM, Hu Tao wrote:
> * daemon/remote.c: implement the server side support
> * src/remote/remote_driver.c: implement the client side support
> * src/remote/remote_protocol.x: definitions for the new entry points
> * src/remote_protocol-structs: structure definitions
> ---
>  daemon/remote.c              |   64 ++++++++++++++++++++++++++++++++++++++++++
>  src/remote/remote_driver.c   |   52 ++++++++++++++++++++++++++++++++++
>  src/remote/remote_protocol.x |   28 +++++++++++++++++-
>  src/remote_protocol-structs  |   24 +++++++++++++++
>  4 files changed, 167 insertions(+), 1 deletions(-)

> +static int
> +remoteDispatchDomainGetInterfaceParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
> +                                           virNetServerClientPtr client ATTRIBUTE_UNUSED,
> +                                           virNetMessagePtr msg ATTRIBUTE_UNUSED,
> +                                           virNetMessageErrorPtr rerr,
> +                                           remote_domain_get_interface_parameters_args *args,
> +                                           remote_domain_get_interface_parameters_ret *ret)
> +{
> +    virDomainPtr dom = NULL;
> +    virTypedParameterPtr params = NULL;

> +    if (VIR_ALLOC_N(params, nparams) < 0) {
> +        virReportOOMError();
> +        goto cleanup;
> +    }
> +

> +
> +cleanup:
> +    if (rv < 0)
> +        virNetMessageSaveError(rerr);
> +    if (dom)
> +        virDomainFree(dom);
> +    VIR_FREE(params);

Memory leak if the hypervisor returned any string types.

-- 
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/20111231/4c2f3099/attachment-0001.sig>


More information about the libvir-list mailing list