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

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


Author: coreyfarrell
Date: Tue Oct 14 11:19:59 2014
New Revision: 425415

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425415
Log:
res_fax: Resolve module reference leak caused by reserved sessions

Remove reference to module providing reserved session after
adding a reference to the final module.  This re-reference
is done to ensure that module references are correct even
if the final session selects a different module than the
reserved session.

ASTERISK-18923 #close
Reported by: Grigoriy Puzankin
Review: https://reviewboard.asterisk.org/r/4048/
........

Merged revisions 425405 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

Merged revisions 425411 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=425415&r1=425414&r2=425415
==============================================================================
--- branches/13/res/res_fax.c (original)
+++ branches/13/res/res_fax.c Tue Oct 14 11:19:59 2014
@@ -1281,6 +1281,10 @@
 			}
 			ast_debug(4, "Requesting a new FAX session from '%s'.\n", faxmod->tech->description);
 			ast_module_ref(faxmod->tech->module);
+			if (reserved) {
+				/* Balance module ref from reserved session */
+				ast_module_unref(reserved->tech->module);
+			}
 			s->tech = faxmod->tech;
 			break;
 		}




More information about the asterisk-commits mailing list