[svn-commits] mjordan: trunk r375799 - in /trunk: ./ res/res_fax.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Nov 3 21:44:39 CDT 2012


Author: mjordan
Date: Sat Nov  3 21:44:35 2012
New Revision: 375799

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375799
Log:
Only deref a reserved gateway session if we actually reserved one

Its perfectly acceptable to have a gateway session unreserved when we go to
first allocate one.  Unreffing the reserved gateway session - when its NULL -
will result in an assertion error.

This problem was caught by the Asterisk Test Suite (once we had enough of the
debugging flags enabled)
........

Merged revisions 375797 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375798 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/res/res_fax.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_fax.c?view=diff&rev=375799&r1=375798&r2=375799
==============================================================================
--- trunk/res/res_fax.c (original)
+++ trunk/res/res_fax.c Sat Nov  3 21:44:35 2012
@@ -2583,7 +2583,9 @@
 	}
 	/* release the reference for the reserved session and replace it with
 	 * the real session */
-	ao2_ref(gateway->s, -1);
+	if (gateway->s) {
+		ao2_ref(gateway->s, -1);
+	}
 	gateway->s = s;
 	gateway->token = NULL;
 




More information about the svn-commits mailing list