mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-20 19:53:10 +00:00
Final fix memleaks in GkClient codes, same for Timer codes.
(these memleaks stop development of gk codes, now i can continue) Fix printHandler 'Unbalanced Structure' issues with locking printHandler data for single thread. ........ Merged revisions 343281 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343445 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -79,7 +79,7 @@ void ooTimerComputeExpireTime (OOTimer* pTimer)
|
||||
|
||||
void ooTimerDelete (OOCTXT* pctxt, DList *pList, OOTimer* pTimer)
|
||||
{
|
||||
dListFindAndRemove (pList, pTimer);
|
||||
dListFindAndRemove (pctxt, pList, pTimer);
|
||||
memFreePtr (pctxt, pTimer);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
|
||||
|
||||
stat = (*pTimer->timeoutCB)(pTimer->cbData);
|
||||
|
||||
if (0 != stat || !pTimer->reRegister) {
|
||||
if (!pTimer->reRegister) {
|
||||
ooTimerDelete (pctxt, pList, pTimer);
|
||||
}
|
||||
}
|
||||
@@ -175,7 +175,7 @@ struct timeval* ooTimerNextTimeout (DList *pList, struct timeval* ptimeout)
|
||||
void ooTimerReset (OOCTXT* pctxt, DList *pList, OOTimer* pTimer)
|
||||
{
|
||||
if (pTimer->reRegister) {
|
||||
dListFindAndRemove (pList, pTimer);
|
||||
dListFindAndRemove (pctxt, pList, pTimer);
|
||||
ooTimerComputeExpireTime (pTimer);
|
||||
ooTimerInsertEntry (pctxt, pList, pTimer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user