Browse Source

avfilter/asrc_flite: Fix textbuf leak

Fixes CID1244189

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3
Michael Niedermayer 8 years ago
parent
commit
bc6b53ae99
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavfilter/asrc_flite.c

+ 3
- 1
libavfilter/asrc_flite.c View File

@@ -170,8 +170,10 @@ static av_cold int init(AVFilterContext *ctx)
return ret;
}

if (!(flite->text = av_malloc(textbuf_size+1)))
if (!(flite->text = av_malloc(textbuf_size+1))) {
av_file_unmap(textbuf, textbuf_size);
return AVERROR(ENOMEM);
}
memcpy(flite->text, textbuf, textbuf_size);
flite->text[textbuf_size] = 0;
av_file_unmap(textbuf, textbuf_size);


Loading…
Cancel
Save