edje - delete obj - null out freed items in structs/data

i just got a segv freeing ian invalid ptr... it SEEMS as if something
has tried to free and edje object twice... but i can't be sure as
valgrind can't catch this. it's a one-off, so ensure after free, we
NULL out things we freed to avoid this.

@fix
This commit is contained in:
Carsten Haitzler 2016-04-13 19:59:00 +09:00
parent bc9bde253a
commit c2e26a5121
2 changed files with 7 additions and 0 deletions

View File

@ -251,15 +251,20 @@ _edje_del(Edje *ed)
}
_edje_message_del(ed);
_edje_signal_callback_free(ed->callbacks);
ed->callbacks = NULL;
_edje_file_del(ed);
if (ed->path) eina_stringshare_del(ed->path);
if (ed->group) eina_stringshare_del(ed->group);
if (ed->parent) eina_stringshare_del(ed->parent);
ed->path = NULL;
ed->group = NULL;
ed->parent = NULL;
eina_hash_free(ed->color_classes);
eina_hash_free(ed->text_classes);
eina_hash_free(ed->size_classes);
ed->color_classes = NULL;
ed->text_classes = NULL;
ed->size_classes = NULL;
EINA_LIST_FREE(ed->text_insert_filter_callbacks, cb)
{
eina_stringshare_del(cb->part);

View File

@ -294,7 +294,9 @@ _edje_signal_callback_free(const Edje_Signal_Callback_Group *cgp)
_edje_signal_callback_matches_unref((Edje_Signal_Callback_Matches *)gp->matches);
gp->matches = NULL;
free(gp->flags);
gp->flags = NULL;
free(gp->custom_data);
gp->custom_data = NULL;
free(gp);
}