History

avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path

Zhao Zhili committed 3 years ago

Commit d2c5c3b1 parent e0880ef1 file · +1 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/dnn/dnn_backend_openvino.c+1−1
@@ -1213,6 +1213,7 @@ static DNNModel *dnn_load_model_ov(const char *model_filename, DNNFunctionType f · 1212 unmodified lines
1213 if (status != OK) {1213 if (status != OK) {
1214 goto err;1214 goto err;
1215 }1215 }
1216 ov_model->core = core;
1216 1217
1217 status = ov_core_read_model(core, model_filename, NULL, &ovmodel);1218 status = ov_core_read_model(core, model_filename, NULL, &ovmodel);
1218 if (status != OK) {1219 if (status != OK) {
@@ -1228,7 +1229,6 @@ static DNNModel *dnn_load_model_ov(const char *model_filename, DNNFunctionType f · 9 unmodified lines
1228 goto err;1229 goto err;
1229 }1230 }
1230 ov_model->ov_model = ovmodel;1231 ov_model->ov_model = ovmodel;
1231 ov_model->core = core;
1232#else1232#else
1233 ov_model->all_input_names = NULL;1233 ov_model->all_input_names = NULL;
1234 ov_model->all_output_names = NULL;1234 ov_model->all_output_names = NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t