summaryrefslogtreecommitdiff
path: root/src/glut
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-12-12 21:46:13 -0800
committerVinson Lee <vlee@vmware.com>2009-12-12 21:46:13 -0800
commit89d85e8170e38e04790a2c10541dec01fee9afd2 (patch)
treeccf6c717f420d93954edda57512cd706faee927f /src/glut
parent20590b97336c4ebe5d2bcee51d66820e1e5d26c8 (diff)
glut: Prevent potential double free in menuVisualSetup.
Diffstat (limited to 'src/glut')
-rw-r--r--src/glut/glx/glut_menu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glut/glx/glut_menu.c b/src/glut/glx/glut_menu.c
index 4c4a5ae750..d136823c54 100644
--- a/src/glut/glx/glut_menu.c
+++ b/src/glut/glx/glut_menu.c
@@ -225,6 +225,7 @@ menuVisualSetup(void)
if (!status) {
XFreeColormap(__glutDisplay, menuColormap);
free(placeHolders);
+ placeHolders = NULL;
continue;
}
}
@@ -241,6 +242,7 @@ menuVisualSetup(void)
XFreeColormap(__glutDisplay, menuColormap);
if (placeHolders) {
free(placeHolders);
+ placeHolders = NULL;
}
continue;
}
@@ -252,6 +254,7 @@ menuVisualSetup(void)
XFreeColormap(__glutDisplay, menuColormap);
if (placeHolders) {
free(placeHolders);
+ placeHolders = NULL;
}
continue;
}
@@ -263,6 +266,7 @@ menuVisualSetup(void)
XFreeColormap(__glutDisplay, menuColormap);
if (placeHolders) {
free(placeHolders);
+ placeHolders = NULL;
}
continue;
}
@@ -271,6 +275,7 @@ menuVisualSetup(void)
XFreeColors(__glutDisplay, menuColormap,
placeHolders, numPlaceHolders, 0);
free(placeHolders);
+ placeHolders = NULL;
}
menuWhite = color.pixel;
menuVisual = visual->vinfo.visual;