From 107f51b69c44b9902ed76ab0e33e89dde5d21cb1 Mon Sep 17 00:00:00 2001 From: Radu Caragea Date: Mon, 4 Jun 2012 09:32:37 +0200 Subject: [PATCH] Fix sync issue in virNetClientStreamEventRemoveCallback The stream lock is unlocked twice instead of being locked and then unlocked. Probably a typo. --- AUTHORS | 1 + src/rpc/virnetclientstream.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 32bce4ec79..c91ef35de8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -239,6 +239,7 @@ Patches have also been contributed by: William Jon McCann David Weber Marti Raudsepp + Radu Caragea [....send patches to get your name here....] diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c index be06c66b48..de61a62f34 100644 --- a/src/rpc/virnetclientstream.c +++ b/src/rpc/virnetclientstream.c @@ -508,7 +508,7 @@ int virNetClientStreamEventRemoveCallback(virNetClientStreamPtr st) { int ret = -1; - virMutexUnlock(&st->lock); + virMutexLock(&st->lock); if (!st->cb) { virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("no stream callback registered")); -- GitLab