[screen-reader] Avoid double free of hash's value 83/243483/1
authorPrasoon Singh <prasoon.16@samsung.com>
Thu, 3 Sep 2020 12:48:41 +0000 (18:18 +0530)
committerArtur Świgoń <a.swigon@samsung.com>
Mon, 7 Sep 2020 12:01:13 +0000 (14:01 +0200)
Freeing reading_info here leads to double free, as g_hash_table_unref also
tries to free this memory.

Change-Id: I6e260e7822f5fe8f9c642d78cd59d841b04a5e22
Signed-off-by: Prasoon Singh <prasoon.16@samsung.com>
src/utils.c

index 213488f1d710616af1c2888c1e09e2425b3e5e05..870e3025936a941ca10e132c83e55cfeff9e0833 100644 (file)
@@ -181,7 +181,6 @@ unsigned short int get_objects_attributes(AtspiAccessible *obj)
                                        (ACCESSIBLE_READING_INFO_TYPE_ROLE) | (ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION) | (ACCESSIBLE_READING_INFO_TYPE_STATE);
        }
        if (hash_table) g_hash_table_unref(hash_table);
-       if (reading_info) g_free(reading_info);
 
        return attribute;
 }