From: sungwook79.park Date: Tue, 13 Mar 2018 07:13:37 +0000 (+0900) Subject: Fix issue detected by static analysis tool X-Git-Tag: submit/tizen/20180329.023339~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dca83ec8129c5bb0ea8e0938eb84715da48c3dd;p=platform%2Fcore%2Fuifw%2Finputdelegator.git Fix issue detected by static analysis tool Change-Id: I0d5c5bb7a2734b46774d1705338b63850c33c124 Signed-off-by: sungwook79.park --- diff --git a/src/voice-recorder.cpp b/src/voice-recorder.cpp index 23139df..3aab708 100644 --- a/src/voice-recorder.cpp +++ b/src/voice-recorder.cpp @@ -161,6 +161,7 @@ static void _recorder_start(voice_recorder *recorder) snprintf(recorder->file_path, PATH_MAX, "%s/%s", voice_content_path, filename); LOGD("recorder->file_path = %s", recorder->file_path); _recorder_apply_settings(recorder); + free(voice_content_path); recorder_prepare(recorder->recorder); recorder_start(recorder->recorder); } diff --git a/src/w-input-keyboard.cpp b/src/w-input-keyboard.cpp index 4e80c6c..774fe4c 100755 --- a/src/w-input-keyboard.cpp +++ b/src/w-input-keyboard.cpp @@ -111,6 +111,7 @@ void exit_keyboard() set_source_caller_app_id(app_control); free(app_id); reply_to_sender_by_callback(getText, "keyboard", NULL, cursorPosition); + app_control_destroy(app_control); ui_app_exit(); } diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 5c990a2..237e4c4 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -1031,8 +1031,10 @@ unsigned int _update_smartreply_items(void *user_data) app_data); item_size++; - if (item_size >= 3) + free(reply); + if (item_size >= 3) { break; + } } elm_genlist_item_class_free(itc); } diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index a7e9754..2aac43a 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -1600,6 +1600,9 @@ static void _stt_entry_clicked_cb(void *data, Evas_Object * obj, void *event_inf elm_naviframe_item_pop_cb_set(navi_it, __stt_entry_detailed_view_pop_cb, (void *)voicedata); elm_naviframe_item_title_enabled_set(navi_it, EINA_FALSE, EINA_FALSE); free(str); + } else { + if (str) free(str); + str = NULL; } return;