Author: khornicek
Date: Fri Nov 21 09:01:01 2008
New Revision: 37514
URL:
http://svn.reactos.org/svn/reactos?rev=37514&view=rev
Log:
- avoid losing pointer to the next bezier patch while freeing the current one (CID 1298)
Modified:
trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc
Modified: trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/glu32/libnurbs/i…
==============================================================================
--- trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc [iso-8859-1]
(original)
+++ trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc [iso-8859-1] Fri Nov
21 09:01:01 2008
@@ -111,8 +111,13 @@
void bezierPatchDeleteList(bezierPatch *b)
{
bezierPatch *temp;
- for(temp = b; temp != NULL; temp = temp->next)
- bezierPatchDelete(temp);
+
+ while(b != NULL)
+ {
+ temp = b->next;
+ bezierPatchDelete(b);
+ b = temp;
+ }
}
bezierPatch* bezierPatchInsert(bezierPatch *list, bezierPatch *b)