Commit 0c1b8dab authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix a memory leak in AXPlatformNodeAuraLinux.

ui::AXPlatformNodeAuraLinux::OnDescriptionChanged() calls
g_value_set_string(), which internally duplicates a string into a
GValue. The GValue needs to be cleared before destruction to avoid
leaking the memory used for the string duplication.

BUG=961907

Change-Id: I38086cd421667dc2a4edf2a9325c5b15cde5645a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638947Reviewed-by: default avatarJoanmarie Diggs <jdiggs@igalia.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665463}
parent 19a26c71
......@@ -3295,6 +3295,7 @@ void AXPlatformNodeAuraLinux::OnDescriptionChanged() {
g_signal_emit_by_name(G_OBJECT(atk_object_),
"property-change::accessible-description",
&property_values, nullptr);
g_value_unset(&property_values.new_value);
}
void AXPlatformNodeAuraLinux::OnValueChanged() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment