[FFmpeg-cvslog] avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path
Zhao Zhili
git at videolan.org
Fri Sep 15 08:38:33 EEST 2023
ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Sat Sep 2 16:23:56 2023 +0800| [d2c5c3b7ef7d202fd428c66ceab89e9e9f474f02] | committer: Guo Yejun
avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2c5c3b7ef7d202fd428c66ceab89e9e9f474f02
---
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;
More information about the ffmpeg-cvslog
mailing list