mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
avfilter/asrc_flite: Fix textbuf leak
Fixes CID1244189 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
520c0736fd
commit
bc6b53ae99
@ -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…
Reference in New Issue
Block a user