Skip to content
Snippets Groups Projects
Commit dec816f9 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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


Fixes CID1355116

Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent c45b1aa8
No related branches found
No related tags found
No related merge requests found
...@@ -2517,6 +2517,7 @@ static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVR ...@@ -2517,6 +2517,7 @@ static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVR
final_dialog = av_strdup(buf.str); final_dialog = av_strdup(buf.str);
if (!av_bprint_is_complete(&buf) || !final_dialog) { if (!av_bprint_is_complete(&buf) || !final_dialog) {
av_freep(&final_dialog);
av_bprint_finalize(&buf, NULL); av_bprint_finalize(&buf, NULL);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment