Eo: Fix reference leak when failing to resolve function.

When resolving a function for an object the object would get reference,
and then in some failure cases won't be freed.

I suspect this is a regression following the reshuffling that was done
in that function recently.

Thanks to zmike for investigating and reporting this.

Fixes T4740

@fix
This commit is contained in:
Tom Hacohen 2016-10-19 16:14:15 +01:00
parent f4eb94a7d8
commit 5a659fafd2
1 changed files with 5 additions and 1 deletions

View File

@ -513,7 +513,11 @@ err_func_src:
ERR("in %s:%d: you called a pure virtual func '%s' (%d) of class '%s'.",
file, line, func_name, cache->op, klass->desc->name);
err:
if (is_obj) _eo_obj_pointer_done((Eo_Id)eo_id);
if (is_obj)
{
_efl_unref(obj);
_eo_obj_pointer_done((Eo_Id)eo_id);
}
return EINA_FALSE;
// yes - special "move out of hot path" code blobs with goto's for