summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-01 08:42:09 -0600
committerBrian <[email protected]>2007-08-01 08:42:09 -0600
commit1904fd095fe1dc4699a0a97a6887d30d2ce53d80 (patch)
tree96206c5e3047b109f8edefa396e91ea39ef952bb
parent897d0ac5cc4dbf0fd0e7b982a60ce6d9650e8ad8 (diff)
fix mem leak (bug 11791)
-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 ec9386f3e50..2513af45394 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++) {