General code fixes (#2609)

This commit is contained in:
Maksim Derbasov 2020-10-14 06:46:12 +03:00 committed by GitHub
parent e79a44c02e
commit 93c2d6db41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -42,8 +42,10 @@ struct classify_res *output_blob_to_classify_res(ie_blob_t *blob, size_t *n) {
ie_blob_buffer_t blob_cbuffer;
status = ie_blob_get_cbuffer(blob, &blob_cbuffer);
if (status != OK)
if (status != OK) {
free(cls);
return NULL;
}
float *blob_data = (float*) (blob_cbuffer.cbuffer);
size_t i;

View File

@ -41,8 +41,10 @@ struct classify_res *output_blob_to_classify_res(ie_blob_t *blob, size_t *n) {
ie_blob_buffer_t blob_cbuffer;
status = ie_blob_get_cbuffer(blob, &blob_cbuffer);
if (status != OK)
if (status != OK) {
free(cls);
return NULL;
}
float *blob_data = (float*) (blob_cbuffer.cbuffer);
size_t i;

View File

@ -213,6 +213,7 @@ ie_config_t *parseConfig(const char *config_file, char comment) {
cfg_temp = cfg_temp->next;
}
}
fclose(file);
return cfg;
}