diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2023-09-02 16:23:56 +0800 |
---|---|---|
committer | Guo Yejun <yejun.guo@intel.com> | 2023-09-15 13:02:15 +0800 |
commit | d2c5c3b7ef7d202fd428c66ceab89e9e9f474f02 (patch) | |
tree | d5f519918246c5a516c7da99d3281b495f5ad5a9 | |
parent | e0880ef8cb5f92d1c2acb951477d04cb782a6705 (diff) | |
download | ffmpeg-d2c5c3b7ef7d202fd428c66ceab89e9e9f474f02.tar.gz |
avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path
-rw-r--r-- | libavfilter/dnn/dnn_backend_openvino.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |