avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path

pull/390/head
Zhao Zhili 1 year ago committed by Guo Yejun
parent e0880ef8cb
commit d2c5c3b7ef
  1. 2
      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;

Loading…
Cancel
Save