diff --git a/reactos/dll/win32/glu32/libtess/dict.c b/reactos/dll/win32/glu32/libtess/dict.c index 76fbbeab6ac..7216d38be09 100644 --- a/reactos/dll/win32/glu32/libtess/dict.c +++ b/reactos/dll/win32/glu32/libtess/dict.c @@ -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 ); }