[ros-diffs] [khornicek] 37510: - store the next node in a separate variable so we won't loose it after freeing the current node (CID 1296)
khornicek at svn.reactos.org
khornicek at svn.reactos.org
Fri Nov 21 14:20:23 CET 2008
Author: khornicek
Date: Fri Nov 21 07:20:22 2008
New Revision: 37510
URL: http://svn.reactos.org/svn/reactos?rev=37510&view=rev
Log:
- store the next node in a separate variable so we won't loose it after freeing the current node (CID 1296)
Modified:
trunk/reactos/dll/win32/glu32/libtess/dict.c
Modified: trunk/reactos/dll/win32/glu32/libtess/dict.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/glu32/libtess/dict.c?rev=37510&r1=37509&r2=37510&view=diff
==============================================================================
--- trunk/reactos/dll/win32/glu32/libtess/dict.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/glu32/libtess/dict.c [iso-8859-1] Fri Nov 21 07:20:22 2008
@@ -67,10 +67,13 @@
/* 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 );
}
More information about the Ros-diffs
mailing list