tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5a659fafd22de295f8a4fb276e343f0da870779f

commit 5a659fafd22de295f8a4fb276e343f0da870779f
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Oct 19 16:14:15 2016 +0100

    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
---
 src/lib/eo/eo.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 8324b21..8ce82f3 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -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

-- 


Reply via email to