[FFmpeg-cvslog] avfilter/asrc_flite: Fix textbuf leak
Michael Niedermayer
git at videolan.org
Fri Jan 6 17:50:21 EET 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jan 6 15:46:56 2017 +0100| [bc6b53ae99cded18296e6beb8dc840722d08be76] | committer: Michael Niedermayer
avfilter/asrc_flite: Fix textbuf leak
Fixes CID1244189
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc6b53ae99cded18296e6beb8dc840722d08be76
---
libavfilter/asrc_flite.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/asrc_flite.c b/libavfilter/asrc_flite.c
index b3f83ab..2e5bd4b 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);
More information about the ffmpeg-cvslog
mailing list