From: Pauli Nieminen Date: Mon, 3 Aug 2009 17:43:38 +0000 (-0700) Subject: xdemos/glxcontexts: Don't leak visual info when choosing visual again. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b59eb3b8b14a8973dd133cbc73949a0993d07fb6;p=mesa.git xdemos/glxcontexts: Don't leak visual info when choosing visual again. Signed-off-by: Pauli Nieminen --- diff --git a/progs/xdemos/glxcontexts.c b/progs/xdemos/glxcontexts.c index 481749be3d8..9f83679acd3 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");