From 530455fcee4767ce17ba56200b13dc688b64857a Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 9 Aug 2017 16:07:15 +0900 Subject: [PATCH] test_gesture_layer2: add null checking after memory allocation --- src/bin/elementary/test_gesture_layer2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/elementary/test_gesture_layer2.c b/src/bin/elementary/test_gesture_layer2.c index f74912a1e5..737cf15940 100644 --- a/src/bin/elementary/test_gesture_layer2.c +++ b/src/bin/elementary/test_gesture_layer2.c @@ -82,6 +82,8 @@ infra_data * _infra_data_alloc(void) { infra_data *infra = malloc(sizeof(infra_data)); + if (!infra) return NULL; + infra->icons = calloc(N_GESTURE_TYPE, sizeof(icon_properties )); infra->colortimer = NULL;