Commit bc6b53ae authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/asrc_flite: Fix textbuf leak

Fixes CID1244189
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 520c0736
...@@ -170,8 +170,10 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -170,8 +170,10 @@ static av_cold int init(AVFilterContext *ctx)
return ret; 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); return AVERROR(ENOMEM);
}
memcpy(flite->text, textbuf, textbuf_size); memcpy(flite->text, textbuf, textbuf_size);
flite->text[textbuf_size] = 0; flite->text[textbuf_size] = 0;
av_file_unmap(textbuf, textbuf_size); av_file_unmap(textbuf, textbuf_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment