[asterisk-commits] coreyfarrell: branch 13 r425459 - in /branches/13: ./ res/res_fax.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 14 11:46:09 CDT 2014


Author: coreyfarrell
Date: Tue Oct 14 11:46:06 2014
New Revision: 425459

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425459
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/
........

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

Merged revisions 425458 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/res/res_fax.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_fax.c?view=diff&rev=425459&r1=425458&r2=425459
==============================================================================
--- branches/13/res/res_fax.c (original)
+++ branches/13/res/res_fax.c Tue Oct 14 11:46:06 2014
@@ -1216,6 +1216,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 asterisk-commits mailing list