Title: [152644] releases/WebKitGTK/webkit-2.0/Source/WebCore
Revision
152644
Author
carlo...@webkit.org
Date
2013-07-15 10:34:39 -0700 (Mon, 15 Jul 2013)

Log Message

Merge r152398 - [GTK] Leak: Free PangoFontDescription* in RenderThemeGtk3
https://bugs.webkit.org/show_bug.cgi?id=118386

Patch by Brian Holt <brian.h...@samsung.com> on 2013-07-04
Reviewed by Carlos Garcia Campos.

Free PangoFontDescription* allocated by gtk_style_context_get (transfer full).

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::spinButtonArrowSize):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog (152643 => 152644)


--- releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog	2013-07-15 17:22:29 UTC (rev 152643)
+++ releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog	2013-07-15 17:34:39 UTC (rev 152644)
@@ -1,3 +1,15 @@
+2013-07-04  Brian Holt  <brian.h...@samsung.com>
+
+        [GTK] Leak: Free PangoFontDescription* in RenderThemeGtk3
+        https://bugs.webkit.org/show_bug.cgi?id=118386
+
+        Reviewed by Carlos Garcia Campos.
+
+        Free PangoFontDescription* allocated by gtk_style_context_get (transfer full).
+
+        * platform/gtk/RenderThemeGtk3.cpp:
+        (WebCore::spinButtonArrowSize):
+
 2013-03-04  Mario Sanchez Prada  <mario.pr...@samsung.com>
 
         [GTK] WebCore::returnString is unsafe and should be removed!

Modified: releases/WebKitGTK/webkit-2.0/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp (152643 => 152644)


--- releases/WebKitGTK/webkit-2.0/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp	2013-07-15 17:22:29 UTC (rev 152643)
+++ releases/WebKitGTK/webkit-2.0/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp	2013-07-15 17:34:39 UTC (rev 152644)
@@ -763,10 +763,11 @@
 
 static gint spinButtonArrowSize(GtkStyleContext* context)
 {
-    const PangoFontDescription* fontDescription;
+    PangoFontDescription* fontDescription;
     gtk_style_context_get(context, static_cast<GtkStateFlags>(0), "font", &fontDescription, NULL);
     gint fontSize = pango_font_description_get_size(fontDescription);
     gint arrowSize = max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
+    pango_font_description_free(fontDescription);
 
     return arrowSize - arrowSize % 2; // Force even.
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to