eunue pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6641c07262085faf062679a21659ff7b45b05a67

commit 6641c07262085faf062679a21659ff7b45b05a67
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Wed Aug 9 16:05:59 2017 +0900

    test_gesture_layer: add null checking after memory allocation
---
 src/bin/elementary/test_gesture_layer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/elementary/test_gesture_layer.c 
b/src/bin/elementary/test_gesture_layer.c
index 0a7bdc29d1..a21fe0846b 100644
--- a/src/bin/elementary/test_gesture_layer.c
+++ b/src/bin/elementary/test_gesture_layer.c
@@ -289,6 +289,8 @@ photo_object_add(Evas_Object *parent, Evas_Object *ic, 
const char *icon, Evas_Co
    char buf[PATH_MAX];
    Photo_Object *po;
    po = calloc(1, sizeof(*po));
+   if (!po) return NULL;
+
    po->base_zoom = po->zoom = BASE_ZOOM;
 
    if (ic)
@@ -360,6 +362,7 @@ test_gesture_layer(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
    int ind = 0;
    Photo_Object **photo_array;
    photo_array = calloc(4, sizeof(*photo_array));
+   if (!photo_array) return;
 
    w = 480;
    h = 800;

-- 


Reply via email to