aboutsummaryrefslogtreecommitdiff
path: root/common/text-to-speech.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/text-to-speech.cpp')
-rw-r--r--common/text-to-speech.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/text-to-speech.cpp b/common/text-to-speech.cpp
index d1b9539f93..1e2456d8a6 100644
--- a/common/text-to-speech.cpp
+++ b/common/text-to-speech.cpp
@@ -38,6 +38,9 @@ TextToSpeechManager::~TextToSpeechManager() {
TTSState *tmp = _ttsState;
while (tmp != nullptr) {
tmp = _ttsState->_next;
+ for (TTSVoice *i = _ttsState->_availaibleVoices.begin(); i < _ttsState->_availaibleVoices.end(); i++) {
+ free(i->_data);
+ }
delete _ttsState;
_ttsState = tmp;
}