/* If no feedback data and EVENT_FINISH */
if (0 >= vc_mgr_data_get_feedback_data_size() && VC_FEEDBACK_EVENT_FINISH == feedback_data->event) {
SLOG(LOG_INFO, TAG_VCM, "[INFO] Finish feedback");
+ if (feedback_data) {
+ free(feedback_data);
+ feedback_data = NULL;
+ }
break;
}
} else {
/* If no feedback data and EVENT_FINISH */
if (0 >= vc_mgr_data_get_feedback_data_size() && VC_FEEDBACK_EVENT_FINISH == feedback_data->event) {
SLOG(LOG_INFO, TAG_VCM, "[INFO] Finish vc tts feedback");
+ if (feedback_data) {
+ free(feedback_data);
+ feedback_data = NULL;
+ }
break;
}
}
pthread_mutex_lock(&g_feedback_data_mutex);
- if (!g_feedback_data.empty()) {
- if (NULL != *data) {
- SLOG(LOG_INFO, TAG_VCM, "[DEBUG] pid(%d), utt_id(%d), data(%p) size(%d) rate(%d)", (*data)->pid, (*data)->utt_id, (*data)->data, (*data)->data_size, (*data)->rate);
-
- if (NULL != (*data)->data) {
- free((*data)->data);
- (*data)->data = NULL;
- }
+ if (NULL != *data) {
+ SLOG(LOG_INFO, TAG_VCM, "[DEBUG] pid(%d), utt_id(%d), data(%p) size(%d) rate(%d)", (*data)->pid, (*data)->utt_id, (*data)->data, (*data)->data_size, (*data)->rate);
- free(*data);
- *data = NULL;
+ if (NULL != (*data)->data) {
+ free((*data)->data);
+ (*data)->data = NULL;
}
+
+ free(*data);
+ *data = NULL;
}
pthread_mutex_unlock(&g_feedback_data_mutex);
if (NULL != engine_info->name) free(engine_info->name);
if (NULL != engine_info->uuid) free(engine_info->uuid);
+ if (NULL != engine_info->default_lang) free(engine_info->default_lang);
+ if (NULL != engine_info->setting) free(engine_info->setting);
int count = g_slist_length(engine_info->languages);