Re: [PATCHv2 1/3] util: unlock closeCallbacks if get callbacks for connect fail

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

 




On 01/10/2017 01:23 AM, Wang King wrote:
> Avoid return with the closeCallbacks locked when get callbacks list for connect fail.
> 
> Signed-off-by: Wang King <king.wang@xxxxxxxxxx>
> ---
>  src/util/virclosecallbacks.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

ACK,

John

> diff --git a/src/util/virclosecallbacks.c b/src/util/virclosecallbacks.c
> index 891a92b..1fa9596 100644
> --- a/src/util/virclosecallbacks.c
> +++ b/src/util/virclosecallbacks.c
> @@ -331,8 +331,10 @@ virCloseCallbacksRun(virCloseCallbacksPtr closeCallbacks,
>  
>      virObjectLock(closeCallbacks);
>      list = virCloseCallbacksGetForConn(closeCallbacks, conn);
> -    if (!list)
> +    if (!list) {
> +        virObjectLock(closeCallbacks);
>          return;
> +    }
>  
>      for (i = 0; i < list->nentries; i++) {
>          char uuidstr[VIR_UUID_STRING_BUFLEN];
> 

--
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]
  Powered by Linux