summaryrefslogtreecommitdiff
path: root/addons/ooh323c/src/dlist.c
diff options
context:
space:
mode:
authorAlexandr Anikin <may@telecom-service.ru>2011-11-04 19:50:10 +0000
committerAlexandr Anikin <may@telecom-service.ru>2011-11-04 19:50:10 +0000
commitc580b163b540ac9bdf07704adf30fa11cb037b6b (patch)
tree8dcfb376ea25d26ea16a0b44dd3082f5b3aca223 /addons/ooh323c/src/dlist.c
parent969f4aa3d63585f8eabe6894b8676a684ceef56e (diff)
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
Diffstat (limited to 'addons/ooh323c/src/dlist.c')
-rw-r--r--addons/ooh323c/src/dlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/ooh323c/src/dlist.c b/addons/ooh323c/src/dlist.c
index 6e110e17b..71dd9ee11 100644
--- a/addons/ooh323c/src/dlist.c
+++ b/addons/ooh323c/src/dlist.c
@@ -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)