progs/xdemos: Fix memory leak in pbdemo.c.
authorVinson Lee <vlee@vmware.com>
Fri, 20 Nov 2009 23:48:29 +0000 (15:48 -0800)
committerVinson Lee <vlee@vmware.com>
Fri, 4 Dec 2009 08:03:14 +0000 (00:03 -0800)
(cherry picked from commit e0857962b911ef317238498305651515d83029ae)

progs/xdemos/pbdemo.c

index 2573209336cc6b09f798bd6e5c13c4b6b91408bc..277df729246bea3853d512f19597d35e15053c1e 100644 (file)
@@ -131,6 +131,7 @@ MakePbuffer( Display *dpy, int screen, int width, int height )
       fbConfigs = ChooseFBConfig(dpy, screen, fbAttribs[attempt], &nConfigs);
       if (nConfigs==0 || !fbConfigs) {
          printf("Note: glXChooseFBConfig(%s) failed\n", fbString[attempt]);
+         XFree(fbConfigs);
          continue;
       }