[asterisk-commits] coreyfarrell: branch 11 r412305 - /branches/11/main/autoservice.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 14 10:50:42 CDT 2014
Author: coreyfarrell
Date: Mon Apr 14 10:50:30 2014
New Revision: 412305
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412305
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
Modified:
branches/11/main/autoservice.c
Modified: branches/11/main/autoservice.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/autoservice.c?view=diff&rev=412305&r1=412304&r2=412305
==============================================================================
--- branches/11/main/autoservice.c (original)
+++ branches/11/main/autoservice.c Mon Apr 14 10:50:30 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);
@@ -174,11 +177,6 @@
}
}
- 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