This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository enventor.

View the commit online.

commit 0c11b0c77336b6b0266b90145ed30ee0f28f3588
Author: Thanatermesis <[email protected]>
AuthorDate: Mon Feb 23 15:52:38 2026 -0500

    fix: Address navigator memory leak, crash risk, and callback logic
    
    I have identified a few issues in src/bin/edc_navigator.c:
    
    1 Memory Leak: In edc_navigator_group_update, the group_list obtained from enventor_item_group_list_get contains strings that need to be freed. While there is a loop at the
    end of the function to free them, the group_list (the Eina_List container itself) is never freed, and if the function returns early due to !cur_group, it leaks.
    2 Logic Error: In edc_navigator_init, two "selected" callbacks are added to the genlist. One sets nd->selected to EINA_TRUE and the other immediately sets it to EINA_FALSE.
    The second one should likely be "unselected".
    3 Potential Crash/Logic: In gl_program_content_get_cb, the tooltip is set on a box that is packed but not explicitly shown (though often child visibility handles this in Elm,
    it's safer to ensure the container follows suit). More importantly, edc_navigator_group_update leaks the list if it returns early.
    
    Here are the fixes:
---
 src/bin/edc_navigator.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/edc_navigator.c b/src/bin/edc_navigator.c
index b16e253..12da8bf 100644
--- a/src/bin/edc_navigator.c
+++ b/src/bin/edc_navigator.c
@@ -1415,6 +1415,8 @@ edc_navigator_group_update(const char *cur_group)
    Eina_List *group_list =
       enventor_item_group_list_get(file_mgr_focused_item_get());
 
+   if (!group_list) return;
+
    unsigned int cur_group_len = 0;
    group_it *git;
    Eina_List *l, *ll;
@@ -1495,6 +1497,7 @@ edc_navigator_group_update(const char *cur_group)
      }
 
    EINA_LIST_FREE(group_list, name) eina_stringshare_del(name);
+   eina_list_free(group_list);
 }
 
 Evas_Object *
@@ -1525,7 +1528,7 @@ edc_navigator_init(Evas_Object *parent)
                                   gl_contract_request_cb, nd);
    evas_object_smart_callback_add(genlist, "selected",
                                   gl_selected_cb, nd);
-   evas_object_smart_callback_add(genlist, "selected",
+   evas_object_smart_callback_add(genlist, "unselected",
                                   gl_unselected_cb, nd);
    evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND,
                                     EVAS_HINT_EXPAND);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to