Title: [133791] trunk/Source/WebCore
Revision
133791
Author
commit-qu...@webkit.org
Date
2012-11-07 12:32:59 -0800 (Wed, 07 Nov 2012)

Log Message

[AC] glXChooseFBConfig() and glXGetVisualFromFBConfig() return values are leaking in GraphicsSurface
https://bugs.webkit.org/show_bug.cgi?id=101475

Patch by Sudarsana Nagineni <sudarsana.nagin...@intel.com> on 2012-11-07
Reviewed by Kenneth Rohde Christiansen.

Free the memory returned by glXChooseFBConfig and glXGetVisualFromFBConfig
using XFree to avoid memory leaks.

No tests. No change in behavior.

* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133790 => 133791)


--- trunk/Source/WebCore/ChangeLog	2012-11-07 20:10:47 UTC (rev 133790)
+++ trunk/Source/WebCore/ChangeLog	2012-11-07 20:32:59 UTC (rev 133791)
@@ -1,3 +1,19 @@
+2012-11-07  Sudarsana Nagineni  <sudarsana.nagin...@intel.com>
+
+        [AC] glXChooseFBConfig() and glXGetVisualFromFBConfig() return values are leaking in GraphicsSurface
+        https://bugs.webkit.org/show_bug.cgi?id=101475
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Free the memory returned by glXChooseFBConfig and glXGetVisualFromFBConfig
+        using XFree to avoid memory leaks.
+
+        No tests. No change in behavior.
+
+        * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
+        (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
+        (WebCore::GraphicsSurfacePrivate::createSurface):
+
 2012-11-07  Fady Samuel  <fsam...@chromium.org>
 
         Autoresize should work even if turned on while the page is loading.

Modified: trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp (133790 => 133791)


--- trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp	2012-11-07 20:10:47 UTC (rev 133790)
+++ trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp	2012-11-07 20:32:59 UTC (rev 133791)
@@ -187,6 +187,9 @@
             XFreePixmap(m_display, m_xPixmap);
         m_xPixmap = 0;
 
+        if (m_fbConfigs)
+            XFree(m_fbConfigs);
+
         if (m_glContext)
             glXDestroyContext(m_display, m_glContext);
     }
@@ -207,6 +210,7 @@
             CWBackPixel | CWBorderPixel | CWColormap, &a);
         XSetWindowBackgroundPixmap(m_display, m_surface, 0);
         XCompositeRedirectWindow(m_display, m_surface, CompositeRedirectManual);
+        XFree(visualInfo);
 
         // Make sure the XRender Extension is available.
         int eventBasep, errorBasep;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to