glx: don't leak fbconfigs
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@intel.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
305a8bcb2f
commit
d26fae246d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user