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

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
12131213 if (status != OK) {
12141214 goto err;
12151215 }
1216+ ov_model->core = core;
12161217
12171218 status = ov_core_read_model(core, model_filename, NULL, &ovmodel);
12181219 if (status != OK) {
@@ -1228,7 +1229,6 @@ static DNNModel *dnn_load_model_ov(const char *model_filename, DNNFunctionType f · 9 unmodified lines
12281229 goto err;
12291230 }
12301231 ov_model->ov_model = ovmodel;
1231− ov_model->core = core;
12321232 #else
12331233 ov_model->all_input_names = NULL;
12341234 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