1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-27 07:40:36 +02:00

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

Fixes CID1355116

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-03-05 01:38:58 +01:00
parent c45b1aa824
commit dec816f92c

View File

@ -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);
}