Fix coverity issues 19/190619/1 accepted/tizen/unified/20181005.012258 submit/tizen/20181004.122202
authorsooyeon.kim <sooyeon.kim@samsung.com>
Thu, 4 Oct 2018 07:11:19 +0000 (16:11 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Thu, 4 Oct 2018 07:11:19 +0000 (16:11 +0900)
Change-Id: I60df426e7bed3a6d809753fb76b4e1dba4a45cbd
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
client/ma_dbus.c

index d4ab1962ae01232b6757fbc4468676cfdba99dc9..bd7942d8c02157f4c022a847ee282123534e817b 100644 (file)
@@ -725,6 +725,18 @@ int ma_dbus_send_result(int pid, const char* display_text, const char* utterance
 
        if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_MAC, "[Dbus ERROR] Fail to Send"); //LCOV_EXCL_LINE
+               if (NULL != tmp_disp_text) {
+                       free(tmp_disp_text);
+                       tmp_disp_text = NULL;
+               }
+               if (NULL != tmp_utt_text) {
+                       free(tmp_utt_text);
+                       tmp_utt_text = NULL;
+               }
+               if (NULL != tmp_result_json) {
+                       free(tmp_result_json);
+                       tmp_result_json = NULL;
+               }
                return MA_ERROR_OPERATION_FAILED;
        } else {
                SLOG(LOG_DEBUG, TAG_MAC, "[Dbus DEBUG] Success to Send");