Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/virchrdev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c
index 5d6de68427..fe11e10437 100644
--- a/src/conf/virchrdev.c
+++ b/src/conf/virchrdev.c
@@ -237,12 +237,10 @@ static void virChrdevFDStreamCloseCb(virStreamPtr st G_GNUC_UNUSED,
void *opaque)
{
virChrdevStreamInfo *priv = opaque;
- virMutexLock(&priv->devs->lock);
+ g_autoptr(virLockGuard) lock = virLockGuardNew(&priv->devs->lock);
/* remove entry from hash */
virHashRemoveEntry(priv->devs->hash, priv->path);
-
- virMutexUnlock(&priv->devs->lock);
}
/**
--
2.31.1