devilhorns pushed a commit to branch master.

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

commit c94289d0b2e0a80b3f20bb2a409479dbb2f96a04
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Mon Dec 28 10:09:36 2015 -0500

    eo: Fix resource leak
    
    Coverity CID1339783 says that we have a potential resource leak here.
    'cb' gets allocated via calloc, but is not freed if we end up
    returning here
    
    @fix
    
    Signed-off-by: Chris Michael <cpmich...@osg.samsung.com>
---
 src/lib/eo/eo_base_class.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index f99ca37..756dc05 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -564,6 +564,7 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data 
*pd,
    if (!cb || !desc || !func)
      {
         ERR("Tried adding callback with invalid values: cb: %p desc: %p func: 
%p\n", cb, desc, func);
+        free(cb);
         return;
      }
    cb->items.item.desc = desc;

-- 


Reply via email to