summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-10-11 08:51:43 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-11 09:25:04 -0400
commit1f1f0f75c0d3f51fb043319516ab6d43f1cb347d (patch)
tree10b146e535d29cb83849ba86bed32ef16e7e34bf /src/lib/ecore_con
parentdcb6380ab5a0d2bbf29429676258c33d09b5b45c (diff)
ecore_con: destructor are always called when finalize return NULL.
Summary: This prevent crash and double free during an invalid Ecore_Con_Eet failure to initialize. Reviewers: zmike, bu5hm4n, segfaultxavi, stefan_schmidt Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10362
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index bd7aed5..2bbbba7 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -693,14 +693,9 @@ _ecore_con_eet_base_efl_object_destructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
693EOLIAN static Efl_Object * 693EOLIAN static Efl_Object *
694_ecore_con_eet_base_efl_object_finalize(Eo *obj, Ecore_Con_Eet_Base_Data *pd) 694_ecore_con_eet_base_efl_object_finalize(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
695{ 695{
696 if (pd->server) return efl_finalize(efl_super(obj, ECORE_CON_EET_BASE_CLASS)); 696 if (!pd->server) return NULL;
697 697
698 eet_data_descriptor_free(pd->edd); 698 return efl_finalize(efl_super(obj, ECORE_CON_EET_BASE_CLASS));
699 eet_data_descriptor_free(pd->matching);
700 eina_hash_free(pd->data_callbacks);
701 eina_hash_free(pd->raw_data_callbacks);
702
703 return NULL;
704} 699}
705 700
706EOLIAN static void 701EOLIAN static void