mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
lavfi/avfiltergraph: fix leak on error
Introduced in eddffbedb3
Fixes: CID1618897 Resource leak
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
fe4b9ef69f
commit
9556379943
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user