Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
autoservice: fix reference leak of logger callid.
Browse files Browse the repository at this point in the history
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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@412307 f38db490-d61c-443f-a65b-d21fe96a405b
  • Loading branch information
coreyfarrell committed Apr 14, 2014
1 parent 68bc581 commit bf2ec80
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main/autoservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ static void *autoservice_run(void *ign)

callid = ast_channel_callid(chan);
ast_callid_threadassoc_change(callid);
if (callid) {
callid = ast_callid_unref(callid);
}

f = ast_read(chan);

Expand Down Expand Up @@ -180,11 +183,6 @@ static void *autoservice_run(void *ign)
* 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;
Expand Down

0 comments on commit bf2ec80

Please sign in to comment.