aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2023-09-02 16:23:52 +0800
committerGuo Yejun <yejun.guo@intel.com>2023-09-15 13:02:15 +0800
commit3e24a2776523866378ef16fbec7ca85291ddccd6 (patch)
tree7aa9edd27cace060b8afcdb420e505297bf06994
parentc1b6235d4158b3771e2a2ee7d5754477df7edc59 (diff)
downloadffmpeg-3e24a2776523866378ef16fbec7ca85291ddccd6.tar.gz
avfilter/dnn_filter_common: fix memleak
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-rw-r--r--libavfilter/dnn_filter_common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c
index d175c91914..3b9182c1d1 100644
--- a/libavfilter/dnn_filter_common.c
+++ b/libavfilter/dnn_filter_common.c
@@ -159,4 +159,10 @@ void ff_dnn_uninit(DnnContext *ctx)
if (ctx->dnn_module) {
(ctx->dnn_module->free_model)(&ctx->model);
}
+ if (ctx->model_outputnames) {
+ for (int i = 0; i < ctx->nb_outputs; i++)
+ av_free(ctx->model_outputnames[i]);
+
+ av_freep(&ctx->model_outputnames);
+ }
}