[libvirt] [PATCH 4/6] Remote driver implementation of new migration API

Eric Blake eblake at redhat.com
Thu Feb 10 18:35:50 UTC 2011


On 02/09/2011 09:58 AM, Daniel P. Berrange wrote:
> * src/remote/remote_protocol.x: Define wire protocol for migration
>   protocol v3
> * daemon/remote.c: Server side dispatch
> * src/remote/remote_driver.c: Client side serialization
> * src/remote/remote_protocol.c, src/remote/remote_protocol.h,
>   daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
>   daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h:
>   Re-generate files

> +
> +static int
> +remoteDispatchDomainMigratePrepare3(struct qemud_server *server ATTRIBUTE_UNUSED,
> +                                    struct qemud_client *client ATTRIBUTE_UNUSED,

> +
> +    /* Wacky world of XDR ... */
> +    if (VIR_ALLOC(uri_out) < 0) {
> +        remoteDispatchOOMError(rerr);
> +        return -1;
> +    }
> +
> +    r = virDomainMigratePrepare3(conn,
> +                                 args->cookie_in.cookie_in_val,
> +                                 args->cookie_in.cookie_in_len,
> +                                 &cookieout, &cookieoutlen,
> +                                 uri_in, uri_out,
> +                                 args->flags, dname, args->resource,
> +                                 args->dom_xml);
> +    if (r == -1) {
> +        remoteDispatchConnError(rerr, conn);
> +        return -1;

This error path leaks uri_out; but the success path is good.

ACK with that nit fixed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list