Add null check for svace issues 40/142940/1
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 8 Aug 2017 01:17:39 +0000 (10:17 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 8 Aug 2017 02:52:10 +0000 (11:52 +0900)
   Add null check because alloc function could return null

Change-Id: Ife8a3cc2cf48ba176e7e94c50c7d78bb2329fc6b

src/lib/elm_atspi_bridge.c

index b3a77ed83c99da5a7bc63d24ef5ab36bc104591b..10227f38799a152b0ecb2035bb89606ffa9f9f32 100644 (file)
@@ -7019,8 +7019,10 @@ elm_atspi_bridge_utils_say(const char* text,
    eldbus_message_iter_arguments_append(iter, "sb", text, discardable);
    if (func) {
       say_info = calloc(1, sizeof(Elm_Atspi_Say_Info));
-      say_info->func = func;
-      say_info->data = (void *)data;
+      if (say_info) {
+         say_info->func = func;
+         say_info->data = (void *)data;
+      }
    }
    eldbus_connection_send(pd->a11y_bus, msg, _on_read_command_call, say_info, -1);
 }