mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
remoteDispatchConnectCloseCallbackRegister introduced in f484310a has problems. It refcounts network client object and in case of NOOP driver operations for registering/unregistering close callback (any driver except for vz) nobody will unref it later. As a result, client connection will not be disposed and driver connection will not be closed. The fix is easy. We don't need to refcount at all. We don't get a dangling pointer because in remoteClientFreeFunc, which is called upon disposing this network client object, we unregister the close callback. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: Erik Skultety <eskultet@redhat.com>