aboutsummaryrefslogtreecommitdiffstats
path: root/src/glut/glx/glut_dstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glut/glx/glut_dstr.c')
-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++) {