summaryrefslogtreecommitdiff
path: root/src/glut
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-01 08:40:49 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-01 08:43:58 -0600
commite9fbf69aeab590d5f292a7ca6bdeb5d2791f9918 (patch)
tree0bab893e5a173d9f4fd7e96c845964d58ae37fdf /src/glut
parenta6dad044e24358af9fe5764ca7b342f4ed4804db (diff)
fix mem leak (bug 11791)
Diffstat (limited to 'src/glut')
-rw-r--r--src/glut/glx/glut_dstr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glut/glx/glut_dstr.c b/src/glut/glx/glut_dstr.c
index ec9386f3e5..2513af4539 100644
--- a/src/glut/glx/glut_dstr.c
+++ b/src/glut/glx/glut_dstr.c
@@ -291,6 +291,7 @@ loadVisuals(int *nitems_return)
fbmodes = (FrameBufferMode *) malloc(n * sizeof(FrameBufferMode));
if (fbmodes == NULL) {
*nitems_return = -1;
+ free(vlist);
return NULL;
}
for (i = 0; i < n; i++) {