summaryrefslogtreecommitdiffstats
path: root/src/glu
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-02 08:40:29 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-02 08:40:29 -0600
commit85421351e65c45249b038214fe8d1ca6b0d69884 (patch)
tree21053bd339f47604f581a391742f1a9bc42b4bc7 /src/glu
parent89cad79b4186166f4420317472801b73410402f4 (diff)
downloadexternal_mesa3d-85421351e65c45249b038214fe8d1ca6b0d69884.zip
external_mesa3d-85421351e65c45249b038214fe8d1ca6b0d69884.tar.gz
external_mesa3d-85421351e65c45249b038214fe8d1ca6b0d69884.tar.bz2
fix invalid pointer usage in bezierPatchDeleteList(), bug 11807
Diffstat (limited to 'src/glu')
-rw-r--r--src/glu/sgi/libnurbs/interface/bezierPatch.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatch.cc b/src/glu/sgi/libnurbs/interface/bezierPatch.cc
index 836ae94..5b7bda1 100644
--- a/src/glu/sgi/libnurbs/interface/bezierPatch.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierPatch.cc
@@ -111,8 +111,11 @@ void bezierPatchDelete(bezierPatch *b)
void bezierPatchDeleteList(bezierPatch *b)
{
bezierPatch *temp;
- for(temp = b; temp != NULL; temp = temp->next)
- bezierPatchDelete(temp);
+ while (b != NULL) {
+ temp = b;
+ b = b->next;
+ bezierPatchDelete(temp);
+ }
}
bezierPatch* bezierPatchInsert(bezierPatch *list, bezierPatch *b)