mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +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:
parent
c45b1aa824
commit
dec816f92c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user