zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=be37c47fff3a7baba486c927a5224bec528c1a96

commit be37c47fff3a7baba486c927a5224bec528c1a96
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Jul 10 14:24:55 2019 -0400

    edje: fix some small leaks when failing to reapply user-defined data
    
    Summary:
    this only occurs when the same text parts don't exist in the new layout,
    which is an extremely unlikely scenario
    
    Depends on D9210
    
    Reviewers: cedric, bu5hm4n
    
    Reviewed By: cedric, bu5hm4n
    
    Subscribers: bu5hm4n, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D9211
---
 src/lib/edje/edje_load.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 5170411700..40109c0c1b 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -1621,11 +1621,23 @@ _edje_object_file_set_internal(Evas_Object *obj, const 
Eina_File *file, const ch
                                       child = eud->u.table.child;
                                       break;
                                     case EDJE_USER_STRING:
+                                      eina_stringshare_del(eud->u.string.text);
+                                      /* string has extra ref in this case */
+                                      if (!had_file)
+                                        
eina_stringshare_del(eud->u.string.text);
+                                      break;
                                     case EDJE_USER_DRAG_STEP:
                                     case EDJE_USER_DRAG_PAGE:
                                     case EDJE_USER_DRAG_VALUE:
                                     case EDJE_USER_DRAG_SIZE:
+                                      break;
                                     case EDJE_USER_TEXT_STYLE:
+                                      {
+                                         Edje_Part_Text_Prop *prop;
+                                         
EINA_LIST_FREE(eud->u.text_style.props, prop)
+                                           free(prop);
+                                      }
+                                    break;
                                     case EDJE_USER_TEXT_EXPAND:
                                     default:
                                       break;

-- 


Reply via email to