mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
virChrdevFDStreamCloseCb: Use virLockGuardLock
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6373a87315
commit
61cb99d32c
@ -237,12 +237,10 @@ static void virChrdevFDStreamCloseCb(virStreamPtr st G_GNUC_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
virChrdevStreamInfo *priv = opaque;
|
||||
virMutexLock(&priv->devs->lock);
|
||||
VIR_LOCK_GUARD lock = virLockGuardLock(&priv->devs->lock);
|
||||
|
||||
/* remove entry from hash */
|
||||
virHashRemoveEntry(priv->devs->hash, priv->path);
|
||||
|
||||
virMutexUnlock(&priv->devs->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user