Re: [PATCH] parallels: don't forget to unlock domain after successful virDomainObjListFindByUUID call

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

 



On 22.04.2015 17:25, Maxim Nestratov wrote:
> Also a typo is fixed (s/detached/attached/)
> 
> Signed-off-by: Maxim Nestratov mnestratov@xxxxxxxxxxxxx
> ---
>  src/parallels/parallels_driver.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
> index 46e6c3e..41908a5 100644
> --- a/src/parallels/parallels_driver.c
> +++ b/src/parallels/parallels_driver.c
> @@ -1081,7 +1081,7 @@ static int parallelsDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
>      privdom = virDomainObjListFindByUUID(privconn->domains, dom->uuid);
>      if (privdom == NULL) {
>          parallelsDomNotFoundError(dom);
> -        goto cleanup;
> +        return -1;
>      }
>  
>      if (!(flags & VIR_DOMAIN_AFFECT_CONFIG)) {
> @@ -1120,13 +1120,14 @@ static int parallelsDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
>          break;
>      default:
>          virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
> -                       _("device type '%s' cannot be detached"),
> +                       _("device type '%s' cannot be attached"),

Technically, this should be in a separate patch. But I'll let it slip
this time.

>                         virDomainDeviceTypeToString(dev->type));
>          break;
>      }
>  
>      ret = 0;
>   cleanup:
> +    virObjectUnlock(privdom);
>      return ret;
>  }
>  
> 

ACKed and pushed.

Michal

--
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]