diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 250eb51e6b..0d843d63f6 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -1709,6 +1709,8 @@ static void remoteClientFreePrivateCallbacks(struct daemonClientPrivate *priv) { g_autoptr(virIdentity) sysident = virIdentityGetSystem(); + VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock); + virIdentitySetCurrent(sysident); DEREG_CB(priv->conn, priv->domainEventCallbacks,