[asterisk-commits] coreyfarrell: branch 12 r412306 - in /branches/12: ./ main/autoservice.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 14 10:53:30 CDT 2014


Author: coreyfarrell
Date: Mon Apr 14 10:53:26 2014
New Revision: 412306

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412306
Log:
autoservice: fix reference leak of logger callid.

autoservice acquires a local reference to the logger callid of each channel
in a loop.  This local reference was not released, causing the callid of
every channel in autoservice to leak.  This change moves the callid unref
inside the loop.

ASTERISK-23616 #close
Reported by: ibercom
........

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

Modified:
    branches/12/   (props changed)
    branches/12/main/autoservice.c

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

Modified: branches/12/main/autoservice.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/autoservice.c?view=diff&rev=412306&r1=412305&r2=412306
==============================================================================
--- branches/12/main/autoservice.c (original)
+++ branches/12/main/autoservice.c Mon Apr 14 10:53:26 2014
@@ -131,6 +131,9 @@
 
 		callid = ast_channel_callid(chan);
 		ast_callid_threadassoc_change(callid);
+		if (callid) {
+			callid = ast_callid_unref(callid);
+		}
 
 		f = ast_read(chan);
 
@@ -180,11 +183,6 @@
 		 * If we did, we'd need to ast_frfree(f) if (f). */
 	}
 
-	if (callid) {
-		ast_callid_threadassoc_remove();
-		callid = ast_callid_unref(callid);
-	}
-
 	asthread = AST_PTHREADT_NULL;
 
 	return NULL;




More information about the asterisk-commits mailing list