[PATCH 2/3] glx: don't leak fbconfigs
przanoni at gmail.com
przanoni at gmail.com
Sat Oct 29 14:08:13 PDT 2011
From: Paulo Zanoni <paulo.r.zanoni at intel.com>
29,952 (208 direct, 29,744 indirect) bytes in 1 blocks are definitely lost in loss record 573 of 573
at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4829BC: createModeFromConfig (glxdricommon.c:131)
by 0x482C09: glxConvertConfigs (glxdricommon.c:185)
by 0x482788: __glXDRIscreenProbe (glxdriswrast.c:468)
by 0x4812FA: GlxExtensionInit (glxext.c:327)
by 0x41FB14: InitExtensions (miinitext.c:471)
by 0x568636: main (main.c:208)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
glx/glxscreens.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index ebb9747..928cf0c 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -419,6 +419,15 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
void __glXScreenDestroy(__GLXscreen *screen)
{
+ __GLXconfig *head, *next;
+
+ head = screen->fbconfigs;
+ while (head) {
+ next = head->next;
+ free(head);
+ head = next;
+ }
+
free(screen->GLXvendor);
free(screen->GLXextensions);
free(screen->GLextensions);
--
1.7.7
More information about the xorg-devel
mailing list