forked from enlightenment/efl
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>
This commit is contained in:
parent
936350d37f
commit
c94289d0b2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue