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

Fixes CID1355116

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/189/head^2
Michael Niedermayer 9 years ago
parent c45b1aa824
commit dec816f92c
  1. 1
      libavcodec/utils.c

@ -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…
Cancel
Save