summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-20 13:01:22 -0800
committerVinson Lee <[email protected]>2009-12-03 23:59:11 -0800
commit7324c22024297d1307f511ee320ebdfd47926228 (patch)
tree1d518e7668dce8cfdcb5f895d470e6aac1e2bfe5 /progs
parent68d206fafa4398826cb26da1c66f1bbc4dc66f0c (diff)
progs/xdemos: Fix memory leak in glxinfo.c.
(cherry picked from commit f080567f4c4018c4885c105a154cb0eb39e6234f)
Diffstat (limited to 'progs')
-rw-r--r--progs/xdemos/glxinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index 445d3ea94b6..c1a032872cd 100644
--- a/progs/xdemos/glxinfo.c
+++ b/progs/xdemos/glxinfo.c
@@ -964,8 +964,10 @@ print_fbconfig_info(Display *dpy, int scrnum, InfoMode mode)
/* get list of all fbconfigs on this screen */
fbconfigs = glXGetFBConfigs(dpy, scrnum, &numFBConfigs);
- if (numFBConfigs == 0)
+ if (numFBConfigs == 0) {
+ XFree(fbconfigs);
return;
+ }
printf("%d GLXFBConfigs:\n", numFBConfigs);
if (mode == Normal)