Remove unnecessary memory allocation 76/134476/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 19 Jun 2017 01:29:03 +0000 (10:29 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 19 Jun 2017 01:29:03 +0000 (10:29 +0900)
Change-Id: Ib2d7693a8fb9d5a844db3d504bc5e22718f10388
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/inputmethod.cpp

index 3a45156..1841ff9 100644 (file)
@@ -401,14 +401,10 @@ void CCoreEventCallback::on_update_lookup_table(SclCandidateTable &table)
     if (g_event_callback.lookup_table_changed) {
         vector<string>::iterator iter = table.candidate.begin();
         for (; iter != table.candidate.end(); ++iter) {
-            string_list = eina_list_append(string_list, strdup(iter->c_str()));
+            string_list = eina_list_append(string_list, iter->c_str());
         }
 
         g_event_callback.lookup_table_changed(string_list, g_event_callback.lookup_table_changed_user_data);
-
-        void *ev;
-        EINA_LIST_FREE(string_list, ev)
-            free((char *)ev);
     }
 }