[libvirt] [PATCH 10/13] Turn virKeepAlive into a virObject

Hu Tao hutao at cn.fujitsu.com
Thu Jul 19 01:14:23 UTC 2012


<...>

> @@ -179,20 +195,13 @@ virKeepAliveTimer(int timer ATTRIBUTE_UNUSED, void *opaque)
>      }
>  
>      virKeepAliveLock(ka);
> -    ka->refs--;
> +    virObjectUnref(ka);
>  
>  cleanup:
>      virKeepAliveUnlock(ka);
>  }

virObjectUnref may have freed ka and we are going to unlock a freed
object.  We can safely remove lock/unlock here.

-- 
Thanks,
Hu Tao




More information about the libvir-list mailing list