summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-08-03 10:43:38 -0700
committerBrian Paul <brianp@vmware.com>2009-08-03 11:55:29 -0600
commitb59eb3b8b14a8973dd133cbc73949a0993d07fb6 (patch)
treea4096b70c5ea37dd5a2d5e521d907b1ae667c00d /progs
parented6125fe9b2a806103cc58a60027aa2aba64dd2f (diff)
xdemos/glxcontexts: Don't leak visual info when choosing visual again.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Diffstat (limited to 'progs')
-rw-r--r--progs/xdemos/glxcontexts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/progs/xdemos/glxcontexts.c b/progs/xdemos/glxcontexts.c
index 481749be3d..9f83679acd 100644
--- a/progs/xdemos/glxcontexts.c
+++ b/progs/xdemos/glxcontexts.c
@@ -378,6 +378,9 @@ make_window( Display *dpy, const char *name,
scrnum = DefaultScreen( dpy );
root = RootWindow( dpy, scrnum );
+ if (visinfo)
+ XFree(visinfo);
+
visinfo = glXChooseVisual( dpy, scrnum, attribs );
if (!visinfo) {
printf("Error: couldn't get an RGB, Double-buffered visual\n");