From f080567f4c4018c4885c105a154cb0eb39e6234f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 20 Nov 2009 13:01:22 -0800 Subject: progs/xdemos: Fix memory leak in glxinfo.c. --- progs/xdemos/glxinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'progs/xdemos/glxinfo.c') 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) -- cgit v1.2.3