Commit dec816f9 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/utils: Fix memleak on error in convert_sub_to_old_ass_form()

Fixes CID1355116
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c45b1aa8
......@@ -2517,6 +2517,7 @@ static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVR
final_dialog = av_strdup(buf.str);
if (!av_bprint_is_complete(&buf) || !final_dialog) {
av_freep(&final_dialog);
av_bprint_finalize(&buf, NULL);
return AVERROR(ENOMEM);
}
......
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