diff options
author | Vinson Lee <vlee@vmware.com> | 2009-12-12 21:46:13 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-12-12 21:46:13 -0800 |
commit | 89d85e8170e38e04790a2c10541dec01fee9afd2 (patch) | |
tree | ccf6c717f420d93954edda57512cd706faee927f /src/glut/glx | |
parent | 20590b97336c4ebe5d2bcee51d66820e1e5d26c8 (diff) |
glut: Prevent potential double free in menuVisualSetup.
Diffstat (limited to 'src/glut/glx')
-rw-r--r-- | src/glut/glx/glut_menu.c | 5 |
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; |