From dec816f92c7cf0bbb0f30c095db05145687c6100 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 5 Mar 2016 01:38:58 +0100 Subject: [PATCH] avcodec/utils: Fix memleak on error in convert_sub_to_old_ass_form() Fixes CID1355116 Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index b99389960f..bbb98046bb 100644 --- a/libavcodec/utils.c +++ b/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); }