[ATK] Leak: AtkAttributeSet* should be freed
https://bugs.webkit.org/show_bug.cgi?id=118307
Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-04
Reviewed by Christophe Dumez.
Source/WebCore:
Use AtkAttributeSet* instead of GSList*.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetObjectLocale):
Tools:
Fixed memory leaks for AtkAttributeSet by calling
atk_attribute_set_free().
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::childElementById):
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(getAtkAttributeSetAsString):
(AccessibilityUIElement::allAttributes):
(AccessibilityUIElement::stringAttributeValue):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::childElementById):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::getAtkAttributeSetAsString):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringAttributeValue):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e2f694d..9afe879 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2013-07-04 Brian Holt <brian.holt@samsung.com>
+
+ [ATK] Leak: AtkAttributeSet* should be freed
+ https://bugs.webkit.org/show_bug.cgi?id=118307
+
+ Reviewed by Christophe Dumez.
+
+ Use AtkAttributeSet* instead of GSList*.
+
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (webkitAccessibleGetObjectLocale):
+
2013-07-04 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Do not expose '\n' for wrapped lines with ATK_TEXT_BOUNDARY_CHAR
diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
index a3e7c23..c4b32a0 100644
--- a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
@@ -811,14 +811,13 @@
const gchar* locale = 0;
AtkAttributeSet* textAttributes = atk_text_get_default_attributes(ATK_TEXT(object));
- for (GSList* attributes = textAttributes; attributes; attributes = attributes->next) {
+ for (AtkAttributeSet* attributes = textAttributes; attributes; attributes = attributes->next) {
AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data);
if (!strcmp(atkAttribute->name, atk_text_attribute_get_name(ATK_TEXT_ATTR_LANGUAGE))) {
locale = cacheAndReturnAtkProperty(object, AtkCachedDocumentLocale, String::fromUTF8(atkAttribute->value));
break;
}
}
-
atk_attribute_set_free(textAttributes);
return locale;