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:
Alexandr Anikin
2011-11-04 19:50:10 +00:00
parent 969f4aa3d6
commit c580b163b5
6 changed files with 18 additions and 12 deletions

View File

@@ -135,7 +135,7 @@ void dListRemove (DList* pList, DListNode* node)
pList->count--;
}
void dListFindAndRemove(DList* pList, void *data)
void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void *data)
{
DListNode *pNode, *pNextNode;
for(pNode = pList->head; pNode !=0; pNode = pNextNode){
@@ -143,8 +143,10 @@ void dListFindAndRemove(DList* pList, void *data)
if(pNode->data == data) /* pointer comparison*/
break;
}
if(pNode)
if(pNode) {
dListRemove(pList, pNode);
memFreePtr(pctxt, pNode);
}
}
DListNode* dListFindByIndex (DList* pList, int index)