diff mbox series

[FFmpeg-devel,v2,7/8] avfilter/dnn_backend_openvino: fix input_port/output_port leaks

Message ID tencent_6A788B9A660290A6A6F4A7D8EA919311DC06@qq.com
State Accepted
Commit 791b88fcb49805df593d6d08803568ace3d2a017
Headers show
Series [FFmpeg-devel,v2,1/8] avfilter/dnn_filter_common: fix memleak | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili Sept. 2, 2023, 8:23 a.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

---
 libavfilter/dnn/dnn_backend_openvino.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index f9944211da..5de27719b2 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -503,6 +503,10 @@  static void dnn_free_model_ov(DNNModel **model)
     }
     ff_queue_destroy(ov_model->task_queue);
 #if HAVE_OPENVINO2
+    if (ov_model->input_port)
+        ov_output_const_port_free(ov_model->input_port);
+    if (ov_model->output_port)
+        ov_output_const_port_free(ov_model->output_port);
     if (ov_model->preprocess)
         ov_preprocess_prepostprocessor_free(ov_model->preprocess);
     if (ov_model->compiled_model)