[PATCH xserver 5/5] glx: free fbconfigs on destroy

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Sat Nov 4 22:06:31 UTC 2017


Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
---
 glx/glxscreens.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 99bf6dd27..73444152a 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -423,8 +423,15 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen)
 void
 __glXScreenDestroy(__GLXscreen * screen)
 {
+    __GLXconfig *config, *next;
+
     free(screen->glvnd);
     free(screen->GLXextensions);
     free(screen->GLextensions);
     free(screen->visuals);
+
+    for (config = screen->fbconfigs; config != NULL; config = next) {
+        next = config->next;
+        free(config);
+    }
 }
-- 
2.14.1.439.g647b9b4702



More information about the xorg-devel mailing list