add free'ing current_engine variable 88/317688/2
authordyamy-lee <dyamy.lee@samsung.com>
Fri, 13 Sep 2024 01:57:58 +0000 (10:57 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Fri, 13 Sep 2024 05:38:26 +0000 (14:38 +0900)
Change-Id: I201bf37c6a523a598a2b9e7af3085606f0c92237

server/ttsd_config.c

index a6675ef93c53541f0244ea40c2c7eb81dfb960b0..a987467644fa019a1ce8e2acc16ac58b55e200ee 100644 (file)
@@ -327,8 +327,10 @@ int ttsd_config_get_personal_voices_list(ttsd_config_supported_personal_voice_cb
        ret = tts_config_mgr_get_personal_voice_list(current_engine, __ttsd_config_personal_voices, user_data);
        if (TTS_CONFIG_ERROR_NONE != ret) {
                SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config ERROR] Fail to get persoanl voice list. ret(%d)", ret);
+               free(current_engine);
                return TTSD_ERROR_OPERATION_FAILED;
        }
+       free(current_engine);
 
        return TTSD_ERROR_NONE;
 }