Message ID | D3XYAJQ7WYLS.QIMB7HCLP9PT@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] lavfi/avfiltergraph: fix leak on error | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index c84dd3cf25..3946f04b53 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -372,8 +372,10 @@ static int filter_query_formats(AVFilterContext *ctx) if (ctx->nb_outputs > FF_ARRAY_ELEMS(cfg_out_stack)) { cfg_out_dyn = av_malloc_array(ctx->nb_outputs, sizeof(*cfg_out_dyn)); - if (!cfg_out_dyn) + if (!cfg_out_dyn) { + av_freep(&cfg_in_dyn); return AVERROR(ENOMEM); + } cfg_out = cfg_out_dyn; } else cfg_out = ctx->nb_outputs ? cfg_out_stack : NULL;