aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-07-04 23:39:23 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-15 12:25:45 +0100
commit5088a3e2d3b1f94fedb4d880413b3e9a2dc9c5fb (patch)
treead99c6bab28655ba265c4e232c6246590b3a1c6b /libavcodec
parentc3b7afa4e917d748f0c3f8237b04ebdd99bdcacb (diff)
downloadffmpeg-5088a3e2d3b1f94fedb4d880413b3e9a2dc9c5fb.tar.gz
avcodec/utils: fix leak of subtitle_header on error path
Fixes: memleak Fixes: 15528/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_STL_fuzzer-5735993371525120 Fixes: 15792/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SAMI_fuzzer-5737754232619008 Fixes: 16008/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SSA_fuzzer-5650582821404672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 923d5c489fd4ffd0b9dbfdc6c14f594bd134ab47) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7cd14c8e1e..f40a533399 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1135,6 +1135,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_dict_free(&tmp);
av_freep(&avctx->priv_data);
+ av_freep(&avctx->subtitle_header);
if (avctx->internal) {
av_frame_free(&avctx->internal->to_free);
av_frame_free(&avctx->internal->compat_decode_frame);