Author: coreyfarrell Date: Tue Oct 14 11:16:45 2014 New Revision: 425405 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425405 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/ Modified: branches/1.8/res/res_fax.c Modified: branches/1.8/res/res_fax.c URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_fax.c?view=diff&rev=425405&r1=425404&r2=425405 ============================================================================== --- branches/1.8/res/res_fax.c (original) +++ branches/1.8/res/res_fax.c Tue Oct 14 11:16:45 2014 @@ -873,6 +873,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; } -- _____________________________________________________________________ -- 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
