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

Re: [libvirt] [PATCH 1/3] parallels: fix prlsdkAddDomain



On Mon, May 18, 2015 at 05:44:18PM +0300, Maxim Nestratov wrote:
> Don't forget to unlock domain on error path
> 
> Signed-off-by: Maxim Nestratov <mnestratov parallels com>
> ---
>  src/parallels/parallels_sdk.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
> index 786e0ad..faae1ae 100644
> --- a/src/parallels/parallels_sdk.c
> +++ b/src/parallels/parallels_sdk.c
> @@ -1443,8 +1443,10 @@ prlsdkAddDomain(parallelsConnPtr privconn, const unsigned char *uuid)
>      }
>  
>      sdkdom = prlsdkSdkDomainLookupByUUID(privconn, uuid);
> -    if (sdkdom == PRL_INVALID_HANDLE)
> +    if (sdkdom == PRL_INVALID_HANDLE) {
> +        virObjectUnlock(dom);
>          return NULL;
> +    }
>  
>      dom = prlsdkLoadDomain(privconn, sdkdom, NULL);
>      PrlHandle_Free(sdkdom);

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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