- 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:
Kamil Hornicek 2008-11-21 13:20:22 +00:00
parent 0f0b1a0a74
commit e491126867

View file

@ -67,10 +67,13 @@ Dict *dictNewDict( void *frame,
/* really __gl_dictListDeleteDict */
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 );
node = next;
}
memFree( dict );
}