[libvirt PATCH v2 06/10] admin: Use automatic mutex management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/admin/admin_server_dispatch.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dispatch.c
index f533fcf539..893c7f1de2 100644
--- a/src/admin/admin_server_dispatch.c
+++ b/src/admin/admin_server_dispatch.c
@@ -165,9 +165,9 @@ adminDispatchConnectOpen(virNetServer *server G_GNUC_UNUSED,
     struct daemonAdmClientPrivate *priv =
         virNetServerClientGetPrivateData(client);
     int ret = -1;
+    VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock);
 
     VIR_DEBUG("priv=%p dmn=%p", priv, priv->dmn);
-    virMutexLock(&priv->lock);
 
     flags = args->flags;
     virCheckFlagsGoto(0, cleanup);
@@ -176,7 +176,6 @@ adminDispatchConnectOpen(virNetServer *server G_GNUC_UNUSED,
  cleanup:
     if (ret < 0)
         virNetMessageSaveError(rerr);
-    virMutexUnlock(&priv->lock);
     return ret;
 }
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux