X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=client%2Fstt_client.c;h=e36e87e2d02928b70310a0723e3632a3df516f06;hb=refs%2Fchanges%2F52%2F79752%2F10;hp=7a4a24ba55ee302b92c2b1c634a7801573636cd4;hpb=854562a21f7bc212fe4fc9d3134a4e9a842fdee3;p=platform%2Fcore%2Fuifw%2Fstt.git diff --git a/client/stt_client.c b/client/stt_client.c index 7a4a24b..e36e87e 100644 --- a/client/stt_client.c +++ b/client/stt_client.c @@ -1,5 +1,5 @@ /* -* Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved +* Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -70,6 +70,7 @@ int stt_client_new(stt_h* stt) client->default_lang_changed_user_data = NULL; client->current_engine_id = NULL; + client->credential = NULL; client->silence_supported = false; client->silence = STT_OPTION_SILENCE_DETECTION_AUTO; @@ -79,6 +80,9 @@ int stt_client_new(stt_h* stt) client->data_count = 0; client->msg = NULL; + client->reason = 0; + client->err_msg = NULL; + client->before_state = STT_STATE_CREATED; client->current_state = STT_STATE_CREATED; @@ -121,8 +125,20 @@ int stt_client_destroy(stt_h stt) free(data->current_engine_id); } + if (NULL != data->err_msg) { + free(data->err_msg); + data->err_msg = NULL; + } + + if (NULL != data->credential) { + free(data->credential); + data->credential = NULL; + } + free(data); free(stt); + data = NULL; + stt = NULL; return 0; } @@ -223,4 +239,4 @@ int stt_client_get_use_callback(stt_client_s* client) GList* stt_client_get_client_list() { return g_client_list; -} \ No newline at end of file +}