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


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to