From 25a35c9ce5602718e2c7921530af876f3e200bcb 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. (cherry picked from commit 107f51b69c44b9902ed76ab0e33e89dde5d21cb1) Conflicts: AUTHORS --- AUTHORS | 1 + src/rpc/virnetclientstream.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index e42f9c402b..3fefd64ad7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -233,6 +233,7 @@ Patches have also been contributed by: MATSUDA Daiki Jan Kiszka Ryan Woodsmall + 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"));