diff --git a/src/datatypes.c b/src/datatypes.c index a60b05c02b59c3f4bcc92dd1d79db127f6414bc4..8d90a4aa0f7f3ee73fde3ef193f9b0e5ac6f1aad 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -239,7 +239,7 @@ void virConnectCloseCallbackDataCall(virConnectCloseCallbackDataPtr close, { virObjectLock(close); - if (!close->callback) + if (!close->conn) goto exit; VIR_DEBUG("Triggering connection close callback %p reason=%d, opaque=%p", @@ -248,7 +248,6 @@ void virConnectCloseCallbackDataCall(virConnectCloseCallbackDataPtr close, if (close->freeCallback) close->freeCallback(close->opaque); - close->callback = NULL; close->freeCallback = NULL; virObjectUnref(close->conn); close->conn = NULL;