summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-10-20 16:16:31 +0200
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commit1a1d10e4d35f488fd07d6c87cd9d8615ccc723cd (patch)
tree44501fee7a696510ca0880eab3f2dd7529588ede
parent7efe90a712f45ba8a267752865da87bc49247aa5 (diff)
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
-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)
9 if (!(*ckey) || !(*pobj) || !(*lkey)) 9 if (!(*ckey) || !(*pobj) || !(*lkey))
10 { 10 {
11 fprintf(stdout, "Not enough memory - at %s line %d\n", __FILE__, __LINE__); 11 fprintf(stdout, "Not enough memory - at %s line %d\n", __FILE__, __LINE__);
12 free(*ckey);
13 free(*pobj);
14 free(*lkey);
12 return EINA_FALSE; 15 return EINA_FALSE;
13 } 16 }
14 17