Commit 81cf906e75 for ffmpeg
commit 81cf906e7587874b6741b69efb401ed4308ca086
Author: Zhao Zhili <quinkblack@foxmail.com>
Date: Thu Oct 29 20:34:58 2026 +0800
avcodec/lcevcdec: release the context when option parsing fails
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
diff --git a/libavcodec/lcevcdec.c b/libavcodec/lcevcdec.c
index fb9e687823..066866a75e 100644
--- a/libavcodec/lcevcdec.c
+++ b/libavcodec/lcevcdec.c
@@ -606,11 +606,12 @@ int ff_lcevc_alloc(FFLCEVCContext **plcevc, AVDictionary **options, int loglevel
ret = av_opt_set_dict2(lcevc, options, 0);
if (ret < 0)
- return ret;
+ goto fail;
if (t = av_dict_iterate(*options, NULL)) {
av_log(NULL, AV_LOG_FATAL, "liblcevc-dec option %s not found.\n", t->key);
- return AVERROR_OPTION_NOT_FOUND;
+ ret = AVERROR_OPTION_NOT_FOUND;
+ goto fail;
}
lcevc->frag = av_mallocz(sizeof(*lcevc->frag));