summaryrefslogtreecommitdiff
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
parentf7278719c1038edfd0a818b418c9bc7377159afd (diff)
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)
1642 { 1642 {
1643 // FIXME: Maybe leaking some chain stuff from copy above? 1643 // FIXME: Maybe leaking some chain stuff from copy above?
1644 ERR("Failed to override functions for %p", eo_id); 1644 ERR("Failed to override functions for %p", eo_id);
1645 if (obj->opt->vtable == vtable)
1646 EO_OPTIONAL_COW_SET(obj, vtable, NULL);
1645 free(vtable); 1647 free(vtable);
1646 goto err; 1648 goto err;
1647 } 1649 }