eo: do not check this here

as coverity points out, _obj_is_override is already dereferencing
obj->opt so this was the wrong spot to check this.

CID 1422014
CID 1422013

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11579
This commit is contained in:
Marcel Hollerbach 2020-03-24 15:45:22 +01:00
parent d533bdbbac
commit 670cfb14fc
1 changed files with 2 additions and 3 deletions

View File

@ -1255,10 +1255,9 @@ _eo_free(_Eo_Object *obj, Eina_Bool manual_free EINA_UNUSED)
}
}
#endif
if (_obj_is_override(obj))
if (obj->opt && _obj_is_override(obj))
{
if (obj->opt)
_vtable_free(obj->opt->vtable, &obj->klass->vtable);
_vtable_free(obj->opt->vtable, &obj->klass->vtable);
EO_OPTIONAL_COW_SET(obj, vtable, NULL);
}