]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Place unlock of mutex in an else block so that it does not get unlocked twice.
authorMark Michelson <mmichelson@digium.com>
Mon, 29 Jun 2009 15:04:17 +0000 (15:04 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 29 Jun 2009 15:04:17 +0000 (15:04 +0000)
(closes issue #15400)
Reported by: aragon

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@204012 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_mixmonitor.c

index 964b7d6323f50cfe1ae9e86efae6f2d9dd9a837c..8d86db74069a83cd0de7ed136e837c161b0653ca 100644 (file)
@@ -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);