Title: [152371] trunk/Tools
Revision
152371
Author
[email protected]
Date
2013-07-03 11:50:24 -0700 (Wed, 03 Jul 2013)

Log Message

[ATK] Leak: more leaks in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118362

Patch by Brian Holt <[email protected]> on 2013-07-03
Reviewed by Christophe Dumez.

Free the memory created by g_strdup_printf.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::language):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::language):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (152370 => 152371)


--- trunk/Tools/ChangeLog	2013-07-03 18:40:19 UTC (rev 152370)
+++ trunk/Tools/ChangeLog	2013-07-03 18:50:24 UTC (rev 152371)
@@ -1,3 +1,17 @@
+2013-07-03  Brian Holt  <[email protected]>
+
+        [ATK] Leak: more leaks in AccessibilityUIElement
+        https://bugs.webkit.org/show_bug.cgi?id=118362
+
+        Reviewed by Christophe Dumez.
+
+        Free the memory created by g_strdup_printf.
+
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        (AccessibilityUIElement::language):
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::language):
+
 2013-07-03  Jer Noble  <[email protected]>
 
         Xcode often gets in a state where the debugger is completely unresponsive

Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (152370 => 152371)


--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-07-03 18:40:19 UTC (rev 152370)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-07-03 18:50:24 UTC (rev 152371)
@@ -436,7 +436,8 @@
     if (!locale)
         return JSStringCreateWithCharacters(0, 0);
 
-    return JSStringCreateWithUTF8CString(g_strdup_printf("AXLanguage: %s", locale));
+    GOwnPtr<char> axValue(g_strdup_printf("AXLanguage: %s", locale));
+    return JSStringCreateWithUTF8CString(axValue.get());
 }
 
 double AccessibilityUIElement::x()

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (152370 => 152371)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-07-03 18:40:19 UTC (rev 152370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-07-03 18:50:24 UTC (rev 152371)
@@ -622,7 +622,8 @@
     if (!locale)
         return JSStringCreateWithCharacters(0, 0);
 
-    return JSStringCreateWithUTF8CString(g_strdup_printf("AXLanguage: %s", locale));
+    GOwnPtr<char> axValue(g_strdup_printf("AXLanguage: %s", locale));
+    return JSStringCreateWithUTF8CString(axValue.get());
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to