summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2015-12-28 10:09:36 -0500
committerChris Michael <cpmichael@osg.samsung.com>2015-12-28 10:09:36 -0500
commitc94289d0b2e0a80b3f20bb2a409479dbb2f96a04 (patch)
tree9b0ca0793d61ced78a5936ec80a59af107241572
parent936350d37fd7d2ba695584db079cfc98eb13faed (diff)
downloadefl-c94289d0b2e0a80b3f20bb2a409479dbb2f96a04.tar.gz
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 <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/eo/eo_base_class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index f99ca37289..756dc058c2 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;