X11 only: Free XVisualInfo structures when they are not needed
[freeglut] / src / freeglut_window.c
index d424969..a469866 100644 (file)
@@ -618,6 +618,7 @@ void fgCloseWindow( SFG_Window* window )
 #if TARGET_HOST_UNIX_X11
 
     glXDestroyContext( fgDisplay.Display, window->Window.Context );
+    XFree( window->Window.VisualInfo );
     XDestroyWindow( fgDisplay.Display, window->Window.Handle );
     XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */