From: Stefan Schmidt Date: Tue, 20 Oct 2015 14:16:31 +0000 (+0200) Subject: examples/camera_light: free resources if we fail to allocate all and leave X-Git-Tag: v1.16.0-beta3~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=397d94c65c6ae3b0f99066b68e9f96e14e5e343f;p=platform%2Fupstream%2Felementary.git 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 --- diff --git a/src/examples/performance/camera_light.c b/src/examples/performance/camera_light.c index 7b006f3..2d4a28c 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; }