From 0354c306e37b26c1fef133be9bc79460804d8e49 Mon Sep 17 00:00:00 2001 From: laurentgom Date: Tue, 12 Oct 2010 09:25:53 +0000 Subject: [PATCH] Fixed memory leak in GlxContext when creating an OpenGL 3 context git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1579 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/Linux/GlxContext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SFML/Window/Linux/GlxContext.cpp b/src/SFML/Window/Linux/GlxContext.cpp index 28d24d02..7b15fee4 100644 --- a/src/SFML/Window/Linux/GlxContext.cpp +++ b/src/SFML/Window/Linux/GlxContext.cpp @@ -244,6 +244,9 @@ void GlxContext::CreateContext(GlxContext* shared, unsigned int bitsPerPixel, co }; myContext = glXCreateContextAttribsARB(myDisplay, configs[0], toShare, true, attributes); } + + if (configs) + XFree(configs); } // If we couldn't create an OpenGL 3 context, adjust the settings