mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- store the next node in a separate variable so we won't loose it after freeing the current node (CID 1296)
svn path=/trunk/; revision=37510
This commit is contained in:
parent
0f0b1a0a74
commit
e491126867
1 changed files with 5 additions and 2 deletions
|
@ -67,10 +67,13 @@ Dict *dictNewDict( void *frame,
|
||||||
/* really __gl_dictListDeleteDict */
|
/* really __gl_dictListDeleteDict */
|
||||||
void dictDeleteDict( Dict *dict )
|
void dictDeleteDict( Dict *dict )
|
||||||
{
|
{
|
||||||
DictNode *node;
|
DictNode *node, *next;
|
||||||
|
|
||||||
for( node = dict->head.next; node != &dict->head; node = node->next ) {
|
node = dict->head.next;
|
||||||
|
while(node != &dict->head) {
|
||||||
|
next = node->next;
|
||||||
memFree( node );
|
memFree( node );
|
||||||
|
node = next;
|
||||||
}
|
}
|
||||||
memFree( dict );
|
memFree( dict );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue