[asterisk-commits] wdoekes: branch 11 r414677 -	/branches/11/channels/chan_unistim.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Wed May 28 04:42:00 CDT 2014
    
    
  
Author: wdoekes
Date: Wed May 28 04:41:53 2014
New Revision: 414677
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=414677
Log:
chan_unistim: Unlock mutex in rare OOM condition.
ASTERISK-23792 #close
Reported by: Peter Whisker
Review: https://reviewboard.asterisk.org/r/3567/
Modified:
    branches/11/channels/chan_unistim.c
Modified: branches/11/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_unistim.c?view=diff&rev=414677&r1=414676&r2=414677
==============================================================================
--- branches/11/channels/chan_unistim.c (original)
+++ branches/11/channels/chan_unistim.c Wed May 28 04:41:53 2014
@@ -6276,10 +6276,10 @@
 		}
 		d = d->next;
 	}
+	ast_mutex_unlock(&devicelock);
 	if (!(lt = ast_calloc(1, sizeof(*lt)))) {
 		return NULL;
 	}
-	ast_mutex_unlock(&devicelock);
 	if (create) {
 		if (!(d = ast_calloc(1, sizeof(*d)))) {
 			return NULL;
    
    
More information about the asterisk-commits
mailing list