aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eo
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-07 10:32:19 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-07 10:42:45 -0700
commitb7840d9177b32f480087bd7f062cc66ab2583485 (patch)
tree0e614131edcb9b72cd14be6421fc4f17cab280be /src/lib/eo
parentelm_win: set shadow geometry based on borderless state (diff)
downloadefl-b7840d9177b32f480087bd7f062cc66ab2583485.tar.gz
eo: temporary prevent segfault.
In some case, detected during eo test suite, the vtable does fail to be fully assigned, but it is still being assigned as the new vtable. Of course when later destroying it, it has already been freed. Leading to a double free.
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/eo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index a567a00d44..cd73df811a 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1642,6 +1642,8 @@ efl_object_override(Eo *eo_id, const Efl_Object_Ops *ops)
{
// FIXME: Maybe leaking some chain stuff from copy above?
ERR("Failed to override functions for %p", eo_id);
+ if (obj->opt->vtable == vtable)
+ EO_OPTIONAL_COW_SET(obj, vtable, NULL);
free(vtable);
goto err;
}