summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-10-20 16:16:31 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2015-10-20 16:16:31 +0200
commit397d94c65c6ae3b0f99066b68e9f96e14e5e343f (patch)
tree44501fee7a696510ca0880eab3f2dd7529588ede /src/examples
parentec69c39e6965c7d0a9fa2f4d09f87af2ad0f8822 (diff)
downloadelementary-397d94c65c6ae3b0f99066b68e9f96e14e5e343f.tar.gz
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
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/performance/camera_light.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/examples/performance/camera_light.c b/src/examples/performance/camera_light.c
index 7b006f39b..2d4a28c31 100644
--- a/src/examples/performance/camera_light.c
+++ b/src/examples/performance/camera_light.c
@@ -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;
}