[asterisk-commits] coreyfarrell: trunk r412307 - in /trunk: ./ main/autoservice.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 14 10:54:53 CDT 2014
Author: coreyfarrell
Date: Mon Apr 14 10:54:50 2014
New Revision: 412307
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412307
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
........
Merged revisions 412306 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/autoservice.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/main/autoservice.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/autoservice.c?view=diff&rev=412307&r1=412306&r2=412307
==============================================================================
--- trunk/main/autoservice.c (original)
+++ trunk/main/autoservice.c Mon Apr 14 10:54:50 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