This commit resolves illegal memory accesses observed via:

  remoteClientFreePrivateCallbacks()
  remoteClientCloseFunc()
  virNetServerClientCloseLocked()
  virNetServerProcessClients()
  daemonServerProcessClients()
  virHashForEach()
  virNetDaemonRun()
  main()

Signed-off-by: Mike Pontillo <mponti...@digitalocean.com>
---
 src/remote/remote_daemon_dispatch.c | 2 ++
 1 file changed, 2 insertions(+)

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,
-- 
2.34.1

Reply via email to