libaurum: fix crash caused by double free logic accepted/tizen/unified/20210127.024808 submit/tizen/20210126.105426
authorWonki Kim <wonki_.kim@samsung.com>
Tue, 26 Jan 2021 09:44:57 +0000 (18:44 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 26 Jan 2021 09:48:41 +0000 (18:48 +0900)
result of g_hash_table_lookup is owned by g_hash.
freeing the result cause double free later.
this patch fixes the problem.

Change-Id: Ice3a63bf84f2262b2a5469bc9bc4336d52e43b29

libaurum/src/Impl/Accessibility/AtspiAccessibleNode.cc

index 436eef8fff11ab676c8fa98ac5b4b62969f703c5..82b1e616b2e9957d4666b52eaef7d402f9488600 100644 (file)
@@ -187,11 +187,6 @@ void AtspiAccessibleNode::refresh()
             if (s) mStyle = std::string(s);
             if (a) mAutomationId = std::string(a);
 
-            free(t);
-            free(s);
-            free(a);
-
-            LOG_F(INFO, "table unref %p", attributes);
             g_hash_table_unref(attributes);
         }