Bug 101475 - [AC] glXChooseFBConfig() and glXGetVisualFromFBConfig() return values are leaking in GraphicsSurface
Summary: [AC] glXChooseFBConfig() and glXGetVisualFromFBConfig() return values are lea...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 07:54 PST by Sudarsana Nagineni (babu)
Modified: 2012-11-07 12:33 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.86 KB, patch)
2012-11-07 08:12 PST, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni (babu) 2012-11-07 07:54:46 PST
Noticed the following two memory leaks in GraphicsSurface.

1) http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp#L175
> m_fbConfigs = glXChooseFBConfig(m_display, DefaultScreen(m_display), attributes, &numReturned);

GLX frame buffer configurations returned by glXChooseFBConfig leaking.

2) http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp#L196
> XVisualInfo* visualInfo = glXGetVisualFromFBConfig(m_display, m_fbConfigs[0]);

Data returned by glXGetVisualFromFBConfig also leaking here. 

We must free these values by using XFree() to avoid memory leaks.
Comment 1 Sudarsana Nagineni (babu) 2012-11-07 08:12:09 PST
Created attachment 172806 [details]
Patch
Comment 2 WebKit Review Bot 2012-11-07 12:33:28 PST
Comment on attachment 172806 [details]
Patch

Clearing flags on attachment: 172806

Committed r133791: <http://trac.webkit.org/changeset/133791>
Comment 3 WebKit Review Bot 2012-11-07 12:33:31 PST
All reviewed patches have been landed.  Closing bug.