From 3a26e9fceb9a95ae14ad93de3dd511d663e99d52 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 20 Sep 2012 18:28:34 +0000 Subject: [PATCH] fix possible race condition --- daemon/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index da7817dd1..fb87ca87e 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1293,7 +1293,7 @@ got_cs: /* nothing found to steal and this end is used */ /* need a new call stream after all */ DBG("case 4"); - if (cs_o) + if (cs_o && cs_o != cs) mutex_unlock(&cs_o->lock); cs_o = cs; cs = callstream_new(c, t->num);