[FFmpeg-devel] [PATCH v2 5/8] avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path
Zhao Zhili
quinkblack at foxmail.com
Sat Sep 2 11:23:56 EEST 2023
From: Zhao Zhili <zhilizhao at tencent.com>
---
libavfilter/dnn/dnn_backend_openvino.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index 7150bf0886..b3910adfc3 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -1213,6 +1213,7 @@ static DNNModel *dnn_load_model_ov(const char *model_filename, DNNFunctionType f
if (status != OK) {
goto err;
}
+ ov_model->core = core;
status = ov_core_read_model(core, model_filename, NULL, &ovmodel);
if (status != OK) {
@@ -1228,7 +1229,6 @@ static DNNModel *dnn_load_model_ov(const char *model_filename, DNNFunctionType f
goto err;
}
ov_model->ov_model = ovmodel;
- ov_model->core = core;
#else
ov_model->all_input_names = NULL;
ov_model->all_output_names = NULL;
--
2.34.1
More information about the ffmpeg-devel
mailing list