From 1efd8ebbed2ccdee2c22011d40e6a1425cb66ec9 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 5 Oct 2012 14:37:55 +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);