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
This commit is contained in:
Mike Blumenkrantz 2019-07-10 14:24:55 -04:00
parent f5d3f575c6
commit be37c47fff
1 changed files with 12 additions and 0 deletions

View File

@ -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;