Free visinfo object (Tilman Sauerbeck)
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 16 Jan 2006 16:17:18 +0000 (16:17 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 16 Jan 2006 16:17:18 +0000 (16:17 +0000)
progs/xdemos/glxinfo.c

index 46311bd645f9227b1e8b33e4e834391f6642efa4..957761273c1af49100631d5c937dc13511d14f52 100644 (file)
@@ -262,6 +262,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
    ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
    if (!ctx) {
       fprintf(stderr, "Error: glXCreateContext failed\n");
+      XFree(visinfo);
       XDestroyWindow(dpy, win);
       return;
    }
@@ -336,6 +337,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
    }
 
    glXDestroyContext(dpy, ctx);
+   XFree(visinfo);
    XDestroyWindow(dpy, win);
 }