forked from enlightenment/efl
examples/camera_light: free resources if we fail to allocate all and leave
We return here leaving maybe some other allocations around and leaking. CID: 1327348, 1327349, 1327350
This commit is contained in:
parent
f9defcd945
commit
998d007558
|
@ -9,6 +9,9 @@ Eina_Bool _alloc_memory(Axis_Key **ckey, Panel_Struct **pobj, Axis_Key **lkey)
|
|||
if (!(*ckey) || !(*pobj) || !(*lkey))
|
||||
{
|
||||
fprintf(stdout, "Not enough memory - at %s line %d\n", __FILE__, __LINE__);
|
||||
free(*ckey);
|
||||
free(*pobj);
|
||||
free(*lkey);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue