Page MenuHomePhabricator

Memory Leak in efl_ui_focus_parent_provider_gen_content_item_map_set() api.
Closed, ResolvedPublic

Description

Both gengrid and genlist creates a content_item_map hash and set it to efl_ui_focus_parent_provider_gen_content_item_map_set() but no one is freeing the hash object. I don't know if the API takes ownership of the object or just a reference.
If someone knows the logic could put a patch.

Asan Leak Callstack:

Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x7f88defe3b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f88ddbb7abf in eina_hash_new ../src/lib/eina/eina_hash.c:756
#2 0x7f88de3dd2fc in _elm_gengrid_efl_object_constructor ../src/lib/elementary/elm_gengrid.c:5740
#3 0x7f88dd5a458e in efl_constructor src/lib/eo/efl_object.eo.c:152
#4 0x7f88dd59a61e in _efl_add_internal_start_do ../src/lib/eo/eo.c:1050
#5 0x7f88dd59afb4 in _efl_add_internal_start ../src/lib/eo/eo.c:1098
#6 0x7f88de3dbbd2 in elm_gengrid_add ../src/lib/elementary/elm_gengrid.c:5593
#7 0x5607ce90d49c in create_gengrid ../src/bin/elementary/test_gengrid.c:367
#8 0x5607ce910926 in test_gengrid ../src/bin/elementary/test_gengrid.c:595
#9 0x5607ce8b3a6b in my_win_main ../src/bin/elementary/test.c:1327
#10 0x5607ce8b3a6b in efl_main ../src/bin/elementary/test.c:1479
#11 0x7f88dd5b6b9f in _event_callback_call ../src/lib/eo/eo_base_class.c:2139
#12 0x7f88dd5b6b9f in _efl_object_event_callback_call ../src/lib/eo/eo_base_class.c:2200
#13 0x7f88dd5a225a in efl_event_callback_call ../src/lib/eo/eo_base_class.c:2203
#14 0x7f88dc979d25 in _efl_loop_arguments_send ../src/lib/ecore/efl_loop.c:344
#15 0x7f88dd5ba730 in _efl_future_cb ../src/lib/eo/eo_base_class.c:2603
#16 0x7f88ddbeeeb6 in _eina_future_cb_dispatch ../src/lib/eina/eina_promise.c:358
#17 0x7f88ddbf46fe in _eina_future_dispatch_internal ../src/lib/eina/eina_promise.c:375
#18 0x7f88ddbf46fe in _eina_future_dispatch ../src/lib/eina/eina_promise.c:394
#19 0x7f88ddbf493f in _eina_future_dispatch ../src/lib/eina/eina_promise.c:424
#20 0x7f88dd5a824a in _futures_dispatch_cb ../src/lib/eo/eo_base_class.c:1847
#21 0x7f88dd5b6824 in _event_callback_call ../src/lib/eo/eo_base_class.c:2115
#22 0x7f88dd5b6824 in _efl_object_event_callback_call ../src/lib/eo/eo_base_class.c:2200
#23 0x7f88dd5a225a in efl_event_callback_call ../src/lib/eo/eo_base_class.c:2203
#24 0x7f88dc967da6 in _ecore_main_loop_iterate_internal ../src/lib/ecore/ecore_main.c:2539
#25 0x7f88dc9691d4 in _ecore_main_loop_begin ../src/lib/ecore/ecore_main.c:1292
#26 0x7f88dc9773af in _efl_loop_begin ../src/lib/ecore/efl_loop.c:57
#27 0x7f88dc97511e in efl_loop_begin src/lib/ecore/efl_loop.eo.c:28
#28 0x5607ce8ac416 in main ../src/bin/elementary/test.c:1485
#29 0x7f88dadf9b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)