[svn-commits] mmichelson: branch 1.6.0 r110085 - in /branches/1.6.0: ./ apps/app_chanspy.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 19 15:37:18 CDT 2008


Author: mmichelson
Date: Wed Mar 19 15:37:18 2008
New Revision: 110085

URL: http://svn.digium.com/view/asterisk?view=rev&rev=110085
Log:
Merged revisions 110084 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r110084 | mmichelson | 2008-03-19 15:34:13 -0500 (Wed, 19 Mar 2008) | 12 lines

Merged revisions 110083 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110083 | mmichelson | 2008-03-19 15:33:03 -0500 (Wed, 19 Mar 2008) | 4 lines

Add a missing unlock in the case that memory allocation fails in app_chanspy.
Thanks to Russell for confirming that this was an issue.


........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_chanspy.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_chanspy.c?view=diff&rev=110085&r1=110084&r2=110085
==============================================================================
--- branches/1.6.0/apps/app_chanspy.c (original)
+++ branches/1.6.0/apps/app_chanspy.c Wed Mar 19 15:37:18 2008
@@ -478,16 +478,15 @@
 
 	ast_mutex_lock(&chanspy_ds->lock);
 
-	chanspy_ds->chan = chan;
-
 	if (!(datastore = ast_channel_datastore_alloc(&chanspy_ds_info, NULL))) {
+		ast_mutex_unlock(&chanspy_ds->lock);
 		chanspy_ds = chanspy_ds_free(chanspy_ds);
 		ast_channel_unlock(chan);
 		return NULL;
 	}
-
+	
+	chanspy_ds->chan = chan;
 	datastore->data = chanspy_ds;
-
 	ast_channel_datastore_add(chan, datastore);
 
 	return chanspy_ds;




More information about the svn-commits mailing list