projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68d206f
)
progs/xdemos: Fix memory leak in glxinfo.c.
author
Vinson Lee
<vlee@vmware.com>
Fri, 20 Nov 2009 21:01:22 +0000
(13:01 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 4 Dec 2009 07:59:11 +0000
(23:59 -0800)
(cherry picked from commit
f080567f4c4018c4885c105a154cb0eb39e6234f
)
progs/xdemos/glxinfo.c
patch
|
blob
|
history
diff --git
a/progs/xdemos/glxinfo.c
b/progs/xdemos/glxinfo.c
index 445d3ea94b6d851d9a7de65a17242c039155cbb1..c1a032872cd0c6dee5ad45dc62b199689ba63863 100644
(file)
--- 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)