SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice change(%s, %d)", config_info.language, config_info.type);
/* Call all callbacks of client*/
- invoke_voice_changed_event(before_lang, before_type, config_info.language, config_info.type, config_info.auto_voice);
+ if (NULL != before_lang) {
+ invoke_voice_changed_event(before_lang, before_type, config_info.language, config_info.type, config_info.auto_voice);
+ free(before_lang);
+ }
free(lang);
- free(before_lang);
}
if (-1 != speech_rate) {