Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
edje: fix some small leaks when failing to reapply user-defined data
Browse files Browse the repository at this point in the history
this only occurs when the same text parts don't exist in the new layout,
which is an extremely unlikely scenario

Differential Revision: https://phab.enlightenment.org/D9211
  • Loading branch information
Mike Blumenkrantz committed Jul 5, 2019
1 parent eebbbda commit 046eac5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/edje/edje_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 046eac5

Please sign in to comment.