[svn-commits] coreyfarrell: branch 11 r425457 - /branches/11/res/res_fax.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 14 11:44:16 CDT 2014


Author: coreyfarrell
Date: Tue Oct 14 11:44:13 2014
New Revision: 425457

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425457
Log:
res_fax: Fix reference leak caused by gateway sessions

Fax gateway session objects can be re-used, causing the
same gateway session to be added to faxregistry.container
more than once.  This change causes fax_session_new to
remove the reserved session from the container before
it's id is changed, ensuring it's possible for the
session to be freed.

ASTERISK-24392 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4049/

Modified:
    branches/11/res/res_fax.c

Modified: branches/11/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_fax.c?view=diff&rev=425457&r1=425456&r2=425457
==============================================================================
--- branches/11/res/res_fax.c (original)
+++ branches/11/res/res_fax.c Tue Oct 14 11:44:13 2014
@@ -992,6 +992,7 @@
 	if (reserved) {
 		s = reserved;
 		ao2_ref(reserved, +1);
+		ao2_unlink(faxregistry.container, reserved);
 
 		/* NOTE: we don't consume the reference to the reserved
 		 * session. The session returned from fax_session_new() is a




More information about the svn-commits mailing list