mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
admin: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
df8992c277
commit
440a8d271d
@ -165,9 +165,9 @@ adminDispatchConnectOpen(virNetServer *server G_GNUC_UNUSED,
|
|||||||
struct daemonAdmClientPrivate *priv =
|
struct daemonAdmClientPrivate *priv =
|
||||||
virNetServerClientGetPrivateData(client);
|
virNetServerClientGetPrivateData(client);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock);
|
||||||
|
|
||||||
VIR_DEBUG("priv=%p dmn=%p", priv, priv->dmn);
|
VIR_DEBUG("priv=%p dmn=%p", priv, priv->dmn);
|
||||||
virMutexLock(&priv->lock);
|
|
||||||
|
|
||||||
flags = args->flags;
|
flags = args->flags;
|
||||||
virCheckFlagsGoto(0, cleanup);
|
virCheckFlagsGoto(0, cleanup);
|
||||||
@ -176,7 +176,6 @@ adminDispatchConnectOpen(virNetServer *server G_GNUC_UNUSED,
|
|||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virNetMessageSaveError(rerr);
|
virNetMessageSaveError(rerr);
|
||||||
virMutexUnlock(&priv->lock);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user