From: Brian Date: Wed, 1 Aug 2007 14:40:49 +0000 (-0600) Subject: fix mem leak (bug 11791) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9fbf69aeab590d5f292a7ca6bdeb5d2791f9918;p=mesa.git fix mem leak (bug 11791) --- 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++) {