[asterisk-commits] coreyfarrell: branch 12 r425458 - in /branches/12: ./ res/res_fax.c

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


Author: coreyfarrell
Date: Tue Oct 14 11:45:14 2014
New Revision: 425458

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

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

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

Modified: branches/12/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_fax.c?view=diff&rev=425458&r1=425457&r2=425458
==============================================================================
--- branches/12/res/res_fax.c (original)
+++ branches/12/res/res_fax.c Tue Oct 14 11:45:14 2014
@@ -1032,6 +1032,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