From: Jaeun Choi Date: Wed, 9 Aug 2017 07:49:15 +0000 (+0900) Subject: test_gesture_layer3: add null checking after memory allocation X-Git-Tag: submit/tizen_3.0/20170816.054926~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb234b2bfcd84e31b722d37f11a5e1e8ef1cb1a3;p=platform%2Fupstream%2Felementary.git test_gesture_layer3: add null checking after memory allocation Change-Id: I0d189511e9c65496d23a7799631f37513f16c690 origin: upstream (c311dc638b8358f27664fba3985d9212748cf92a) --- diff --git a/src/bin/test_gesture_layer3.c b/src/bin/test_gesture_layer3.c index 8f082396f..717f5a11a 100644 --- a/src/bin/test_gesture_layer3.c +++ b/src/bin/test_gesture_layer3.c @@ -473,6 +473,8 @@ photo_object_add(Evas_Object *parent, Evas_Object *ic, const char *icon, 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) @@ -559,6 +561,7 @@ test_gesture_layer3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, int ind = 0; Photo_Object **photo_array; photo_array = calloc(sizeof(*photo_array), 4); + if (!photo_array) return; w = 480; h = 800;