diff --git a/apps/app_festival.c b/apps/app_festival.c index e7cbd47bf72f6f9289cd27d880d0b8b67bb587ed..6a67ad5807d05e1ea8f0afbcf925cc503b199dbd 100644 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -238,11 +238,13 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in myf.f.data = myf.frdata; if (ast_write(chan, &myf.f) < 0) { res = -1; + ast_frfree(f); break; } if (res < needed) { /* last frame */ ast_log(LOG_DEBUG, "Last frame\n"); res=0; + ast_frfree(f); break; } } else {