From bb5827950e5b520eeef3bde07058a1c9d51845e4 Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Wed, 17 Feb 2016 15:14:59 +0300 Subject: [PATCH] virConnectCloseCallbackDataDispose: remove unnecessary locks We don't need locks in dispose functions as they can only be run in one thread for given object. --- src/datatypes.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/datatypes.c b/src/datatypes.c index 4258358d26..f9f0b5666c 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -186,13 +186,7 @@ void virConnectCloseCallbackDataReset(virConnectCloseCallbackDataPtr close) static void virConnectCloseCallbackDataDispose(void *obj) { - virConnectCloseCallbackDataPtr cb = obj; - - virObjectLock(cb); - - virConnectCloseCallbackDataReset(cb); - - virObjectUnlock(cb); + virConnectCloseCallbackDataReset(obj); } void virConnectCloseCallbackDataRegister(virConnectCloseCallbackDataPtr close, -- GitLab