summaryrefslogtreecommitdiff
path: root/thread/src
diff options
context:
space:
mode:
authoryumi82.ko <yumi82.ko@samsung.com>2013-01-10 16:59:10 +0900
committeryumi82.ko <yumi82.ko@samsung.com>2013-01-10 16:59:10 +0900
commit823272a38d89ec5d092f579951a921cee18afd73 (patch)
tree33d7bb0a65aa7e21b8812e90aadf24d57c6034d8 /thread/src
parent9118af5160a8757bf0e285d5a24d70e4fff3db18 (diff)
downloadmessage-app-823272a38d89ec5d092f579951a921cee18afd73.tar.gz
message-app-823272a38d89ec5d092f579951a921cee18afd73.tar.bz2
message-app-823272a38d89ec5d092f579951a921cee18afd73.zip
fix prevent defect. 38150, 23538
Change-Id: I0a1cead50ced103f702afac43d38dfd0e76ddc46
Diffstat (limited to 'thread/src')
-rwxr-xr-xthread/src/msg-ui-thread-list.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/thread/src/msg-ui-thread-list.c b/thread/src/msg-ui-thread-list.c
index 5dcfc50..1f32033 100755
--- a/thread/src/msg-ui-thread-list.c
+++ b/thread/src/msg-ui-thread-list.c
@@ -394,6 +394,7 @@ static void __msg_ui_thread_gl_sel(void *data, Evas_Object *obj, void *event_inf
err = msg_get_message_list(msg_ui_thread_get_data_handle(), MSG_DRAFT_ID, item_data->thread_id, 0, MSG_STORAGE_PHONE, &draft_list);
if (err != MSG_SUCCESS) {
MSG_UI_DEBUG(MSG_UI_LEVEL_ERR, "msg_get_message_list() is failed = %d", err);
+ service_destroy(svc_handle);
return;
}
@@ -1533,11 +1534,14 @@ Eina_Bool msg_ui_thread_list_msg_item_update(PMSG_THREAD_LIST_DATA pListData, ms
msg_release_struct(&sendOpt);
msg_ui_thread_list_item_update(pListData, thread_id);
- if (search_str)
- free(search_str);
- msg_release_struct(&search_s);
- return EINA_TRUE;
}
+
+ if (search_str) {
+ free(search_str);
+ search_str = NULL;
+ }
+ msg_release_struct(&search_s);
+ return EINA_TRUE;
}
MSG_UI_DEBUG(MSG_UI_LEVEL_DEBUG, "Search string word = [%s] ", search_str);
@@ -1558,12 +1562,17 @@ Eina_Bool msg_ui_thread_list_msg_item_update(PMSG_THREAD_LIST_DATA pListData, ms
break;
default:
D_MSG("[WARNING] invalid view mode");
+ if (search_str) {
+ free(search_str);
+ search_str = NULL;
+ }
return EINA_FALSE;
}
msg_set_str_value(search_s, MSG_SEARCH_CONDITION_SEARCH_VALUE_STR, search_str, strlen(search_str));
err = msg_search_message(pData->msgHandle, search_s, 0, 0, &msg_list);
free(search_str);
+ search_str = NULL;
msg_release_struct(&search_s);
MSG_UI_RETV_IF(MSG_UI_LEVEL_DEBUG, err != MSG_SUCCESS, EINA_FALSE);