diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-01-06 15:46:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-01-06 16:26:05 +0100 |
commit | bc6b53ae99cded18296e6beb8dc840722d08be76 (patch) | |
tree | 054c53776e837c05a1e17db8b848ab3c175e48c8 /libavfilter | |
parent | 520c0736fd2079f04a2a0ba09562bae49f62f472 (diff) | |
download | ffmpeg-bc6b53ae99cded18296e6beb8dc840722d08be76.tar.gz |
avfilter/asrc_flite: Fix textbuf leak
Fixes CID1244189
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/asrc_flite.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/asrc_flite.c b/libavfilter/asrc_flite.c index b3f83abd74..2e5bd4b6c0 100644 --- a/libavfilter/asrc_flite.c +++ b/libavfilter/asrc_flite.c @@ -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); |