1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path

This commit is contained in:
Zhao Zhili
2023-09-02 16:23:56 +08:00
committed by Guo Yejun
parent e0880ef8cb
commit d2c5c3b7ef

View File

@@ -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;