Commit a1f427651d0111463bd44d08d58ae9ecc4a9321e

Sam Lantinga 2016-11-01T10:46:47

Patch from Tapani P?lli to fix a memory leak in X11_GL_CreateContext

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index abc699d..3c73f8b 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -648,6 +648,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
                     context = _this->gl_data->glXCreateContextAttribsARB(display,
                                                     framebuffer_config[0],
                                                     share_context, True, attribs);
+                    X11_XFree(framebuffer_config);
                 }
             }
         }