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

git pushed a commit to branch master
in repository efl.

View the commit online.

commit 6376835292efd8bf808ffb9be62df15cdbc581ab
Author: Cedric BAIL <[email protected]>
AuthorDate: Thu Nov 12 18:01:55 2026 -0600

    evas: free the clipped smart data a smart object is deleted with
    
    Every clipped smart object (every edje object, every widget) leaked the
    16 bytes of state evas allocates for it in
    _evas_object_smart_clipped_init.
    
    Since e380dae4bc the destructor frees that state when evas owns it
    (data_nofree unset), but evas_object_smart_del, which runs first, sets
    the pointer to NULL without freeing it, so the destructor never sees
    anything to free. A plain C program creating and deleting one window
    lost 9 blocks per window to this.
    
    Free it where it is dropped when evas owns it. Data a legacy smart
    class set with evas_object_smart_data_set stays the class's to free.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/lib/evas/canvas/evas_object_smart.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index a42e5ba43d..61781aee62 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -1465,6 +1465,11 @@ evas_object_smart_del(Evas_Object *eo_obj)
    free(sobj->interface_privates);
    sobj->interface_privates = NULL;
 
+   /* Data evas allocated itself (the clipped smart state) is evas's to free:
+    * the destructor would, but it only ever sees the NULL set below. Data a
+    * legacy smart class handed over with evas_object_smart_data_set() stays
+    * that class's own. */
+   if (!sobj->data_nofree) free(sobj->data);
    sobj->data = ""
    if (s) evas_object_smart_unuse(s);
 }

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

Reply via email to