We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2539

Summary: SDL_GL_CreateContext memory leak (x11)
Product: SDL Reporter: Tito Latini <tito.01beta>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: dafioram
Version: HG 2.1   
Hardware: x86   
OS: Linux   
Attachments: patch for x11opengl memory leak
corrected patch

Description Tito Latini 2014-05-11 23:24:44 UTC
Created attachment 1645 [details]
patch for x11opengl memory leak

No problem if

        _this->gl_config.major_version < 3 &&
        _this->gl_config.profile_mask == 0 &&
        _this->gl_config.flags == 0

otherwise it is necessary to explicitly free the pointer returned by
glXChooseFBConfig [1].

Unluckily, there isn't a way to retrieve the fbconfig-pointer from a
GLXContext. I've attached a patch with a possible solution.

[1] https://www.opengl.org/sdk/docs/man2/xhtml/glXChooseFBConfig.xml
Comment 1 Tito Latini 2014-05-12 09:40:38 UTC
Created attachment 1647 [details]
corrected patch
Comment 2 Tito Latini 2014-05-12 09:42:07 UTC
sorry, the original patch contains an error (corrected).
Comment 3 dafioram 2017-09-22 14:08:37 UTC
This sounds similar to a memory bug in ResidualVM.

See https://github.com/residualvm/residualvm/issues/1365.