[libvirt] [PATCH] daemon: Avoid resetting errors before they are reported

Eric Blake eblake at redhat.com
Fri Mar 25 13:57:44 UTC 2011


On 03/25/2011 05:38 AM, Jiri Denemark wrote:
> Commit f44bfb7 was supposed to make sure no additional libvirt API (esp.
> *Free) is called before remoteDispatchConnError() is called on error.
> However, the patch missed two instances.
> ---
>  daemon/remote.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/daemon/remote.c b/daemon/remote.c
> index 7520df3..7d0016c 100644
> --- a/daemon/remote.c
> +++ b/daemon/remote.c
> @@ -5105,12 +5105,13 @@ remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUS
>      ret->names.names_len =
>          virStoragePoolListVolumes (pool,
>                                     ret->names.names_val, args->maxnames);
> -    virStoragePoolFree(pool);
>      if (ret->names.names_len == -1) {
>          VIR_FREE(ret->names.names_val);
>          remoteDispatchConnError(rerr, conn);
> +        virStoragePoolFree(pool);
>          return -1;
>      }
> +    virStoragePoolFree(pool);


Oops - in spite of me scouring the file in my review, I still missed those.

ACK.

-- 
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/20110325/84d113de/attachment-0001.sig>


More information about the libvir-list mailing list