Mesa (mesa_7_6_branch): progs/xdemos: Fix memory leak in pbdemo.c.

Vinson Lee vlee at kemper.freedesktop.org
Fri Dec 4 08:03:34 UTC 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 4bf96ebdaeac780a5f28c0413b4e2fc5848f923c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4bf96ebdaeac780a5f28c0413b4e2fc5848f923c

Author: Vinson Lee <vlee at vmware.com>
Date:   Fri Nov 20 15:48:29 2009 -0800

progs/xdemos: Fix memory leak in pbdemo.c.
(cherry picked from commit e0857962b911ef317238498305651515d83029ae)

---

 progs/xdemos/pbdemo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/progs/xdemos/pbdemo.c b/progs/xdemos/pbdemo.c
index 2573209..277df72 100644
--- a/progs/xdemos/pbdemo.c
+++ b/progs/xdemos/pbdemo.c
@@ -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;
       }
 




More information about the mesa-commit mailing list