Fix return types
[platform/core/uifw/stt.git] / common / stt_engine.c
index 2c65e04..ab6a4bc 100644 (file)
@@ -360,8 +360,10 @@ int stt_engine_get_first_language(char** language)
                while (NULL != iter) {
                        data = iter->data;
 
-                       if (NULL != data)
+                       if (NULL != data) {
                                free(data);
+                               data = NULL;
+                       }
 
                        lang_list = g_slist_remove_link(lang_list, iter);
 
@@ -772,7 +774,7 @@ int stt_engine_send_result(stte_result_event_e event, const char* type, const ch
                        SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Fail to send result");
                }
        } else {
-               g_result_cb(event, type, result, result_count, msg, time_info, user_data);
+               ret = g_result_cb(event, type, result, result_count, msg, time_info, user_data);
        }
        return ret;
 }