From 8d075b1f93045faa129a01bc07e431de414cf3bf Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Thu, 4 Oct 2018 16:11:19 +0900 Subject: [PATCH] Fix coverity issues Change-Id: I60df426e7bed3a6d809753fb76b4e1dba4a45cbd Signed-off-by: sooyeon.kim --- client/ma_dbus.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/ma_dbus.c b/client/ma_dbus.c index d4ab196..bd7942d 100644 --- a/client/ma_dbus.c +++ b/client/ma_dbus.c @@ -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"); -- 2.34.1