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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]