Re: [libvirt] [PATCH v2 2/3] libxl: fix segfault in libxlReconnectDomain

2016-08-02 Thread Michal Privoznik
On 28.07.2016 11:57, Cédric Bosdonnat wrote: > In case of error, libxlReconnectDomain may call > virDomainObjListRemoveLocked. However it has no local reference on > the domain object, leading to segfault. Get a reference to the domain > object at the start of the function and release it at the

[libvirt] [PATCH v2 2/3] libxl: fix segfault in libxlReconnectDomain

2016-07-28 Thread Cédric Bosdonnat
In case of error, libxlReconnectDomain may call virDomainObjListRemoveLocked. However it has no local reference on the domain object, leading to segfault. Get a reference to the domain object at the start of the function and release it at the end to avoid problems. This commit also factorizes