From: Mark Michelson Date: Mon, 29 Jun 2009 15:04:17 +0000 (+0000) Subject: Place unlock of mutex in an else block so that it does not get unlocked twice. X-Git-Tag: 1.4.26~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3848ec74c6a43158995d27d2ae755003ba9f361;p=thirdparty%2Fasterisk.git Place unlock of mutex in an else block so that it does not get unlocked twice. (closes issue #15400) Reported by: aragon git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@204012 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 964b7d6323..8d86db7406 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -273,8 +273,9 @@ static void *mixmonitor_thread(void *obj) ast_writestream(*fs, cur); } } + } else { + ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock); } - ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock); /* All done! free it. */ ast_frame_free(fr, 0);