mirror of https://gitee.com/openkylin/libvirt.git
remote: Don't call NULL closeFreeCallback
Check function pointer before calling. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
parent
d8d4aa01d8
commit
d0cc811ed0
|
@ -358,7 +358,8 @@ static void remoteClientCloseFunc(virNetClientPtr client ATTRIBUTE_UNUSED,
|
|||
closeCallback(conn, reason, closeOpaque);
|
||||
virMutexLock(&conn->lock);
|
||||
conn->closeDispatch = false;
|
||||
if (conn->closeUnregisterCount != closeUnregisterCount)
|
||||
if (conn->closeUnregisterCount != closeUnregisterCount &&
|
||||
closeFreeCallback)
|
||||
closeFreeCallback(closeOpaque);
|
||||
}
|
||||
virMutexUnlock(&conn->lock);
|
||||
|
|
Loading…
Reference in New Issue