Title: [100464] trunk/Source/WebKit2
Revision
100464
Author
kbal...@webkit.org
Date
2011-11-16 10:05:28 -0800 (Wed, 16 Nov 2011)

Log Message

[WK2][X11] Don't leak the colormap we created for the plugin
https://bugs.webkit.org/show_bug.cgi?id=72144

Reviewed by Xan Lopez.

* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformDestroy):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (100463 => 100464)


--- trunk/Source/WebKit2/ChangeLog	2011-11-16 17:33:29 UTC (rev 100463)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-16 18:05:28 UTC (rev 100464)
@@ -1,3 +1,13 @@
+2011-11-16  Balazs Kelemen  <kbal...@webkit.org>
+
+        [WK2][X11] Don't leak the colormap we created for the plugin
+        https://bugs.webkit.org/show_bug.cgi?id=72144
+
+        Reviewed by Xan Lopez.
+
+        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
+        (WebKit::NetscapePlugin::platformDestroy):
+
 2011-11-16  Viatcheslav Ostapenko  <ostapenko.viatches...@nokia.com>
 
         [Qt] [WK2] Crash in Connection::readyReadHandler() on socket error

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp (100463 => 100464)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-16 17:33:29 UTC (rev 100463)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-16 18:05:28 UTC (rev 100464)
@@ -193,10 +193,13 @@
 
 void NetscapePlugin::platformDestroy()
 {
-    delete static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info);
+    NPSetWindowCallbackStruct* callbackStruct = static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info);
+    Display* hostDisplay = x11HostDisplay();
+    XFreeColormap(hostDisplay, callbackStruct->colormap);
+    delete callbackStruct;
 
     if (m_drawable) {
-        XFreePixmap(x11HostDisplay(), m_drawable);
+        XFreePixmap(hostDisplay, m_drawable);
         m_drawable = 0;
     }
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to