elm: Add null check for svace issues
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 12 Dec 2017 10:08:54 +0000 (15:38 +0530)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 13:11:47 +0000 (22:11 +0900)
 Add null check because alloc function could return null

@tizen_fix

orignal patch: afd2f1e6d978c0981b264f63b9cc2497cff18378

Change-Id: I7282122af463842220ef26277313683eb5352057

src/lib/elementary/elm_atspi_bridge.c

index 5648a3c..313f483 100644 (file)
@@ -6896,8 +6896,11 @@ 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);
 }