RETVM_IF(NULL == parameter, TTS_ERROR_INVALID_PARAMETER, "[ERROR] Input handle is null");
- free(parameter->language);
- parameter->language = NULL;
- free(parameter->ptts_id);
- parameter->ptts_id = NULL;
+ if (parameter->language) {
+ free(parameter->language);
+ parameter->language = NULL;
+ }
+
+ if (parameter->ptts_id) {
+ free(parameter->ptts_id);
+ parameter->ptts_id = NULL;
+ }
free(parameter);
+ parameter = NULL;
SLOG(LOG_DEBUG, TAG_TTSC, "[SUCCESS] Destroy the handle for a synthesis parameter");
return TTS_ERROR_NONE;
/**
- * @brief Adds silence for the specified amount of time
+ * @brief Adds silence for the specified amount of time.
* @since_tizen 9.0
* @remarks The maximum silent time is 5000 msec. If you want to perform a silent time of more than 5000 msec, call this function several times.
* @param[in] tts The TTS handle
/**
* @brief Creates a handle for TTS synthesis parameters.
* @since_tizen 9.0
- * @remarks If the function succeeds, @a paramter handle must be released with tts_synthesis_parameter_destroy().
+ * @remarks If the function succeeds, @a parameter handle must be released with tts_synthesis_parameter_destroy().
* @param[out] parameter The TTS synthesis parameter handle
* @return @c 0 on success,
* otherwise a negative error value
int tts_synthesis_parameter_create(tts_synthesis_parameter_h *parameter);
/**
- * @brief Destroys the TTS synthesis paramter handle.
+ * @brief Destroys the TTS synthesis parameter handle.
* @since_tizen 9.0
* @param[in] parameter The TTS synthesis parameter handle
* @return @c 0 on success,