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;
free(data->err_msg);
}
+ if (NULL != data->credential) {
+ free(data->credential);
+ }
+
free(data);
free(stt);
GList* stt_client_get_client_list()
{
return g_client_list;
-}
\ No newline at end of file
+}
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt start : uid(%d), language(%s), type(%s)", uid, lang, type);
}
- if (NULL == credential)
- credential = strdup("NULL");
+ char *temp = NULL;
+ if (NULL == credential) {
+ temp = strdup("NULL");
+ } else {
+ temp = strdup(credential);
+ }
dbus_message_append_args(msg,
DBUS_TYPE_INT32, &uid,
DBUS_TYPE_STRING, &type,
DBUS_TYPE_INT32, &silence,
DBUS_TYPE_STRING, &appid,
- DBUS_TYPE_STRING, &credential,
+ DBUS_TYPE_STRING, &temp,
DBUS_TYPE_INVALID);
#if 1
if (g_conn_sender) {
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt start message : Out Of Memory !");
+ if (NULL != temp) {
+ free(temp);
+ temp = NULL;
+ }
return STT_ERROR_OUT_OF_MEMORY;
} else {
dbus_connection_flush(g_conn_sender);
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ if (NULL != temp) {
+ free(temp);
+ temp = NULL;
+ }
return STT_ERROR_OPERATION_FAILED;
}
+ if (NULL != temp) {
+ free(temp);
+ temp = NULL;
+ }
return 0;
#else
DBusError err;