C: taxonomy: fixed a segfault on linux when trying to fclose an unopened

file
This commit is contained in:
Celine Mercier
2019-03-30 15:19:12 +01:00
parent ce686e9569
commit 52b3a9fc39

View File

@ -571,13 +571,11 @@ static FILE* open_ecorecorddb(const char* file_name,
{ {
obi_set_errno(OBI_TAXONOMY_ERROR); obi_set_errno(OBI_TAXONOMY_ERROR);
obidebug(1, "\nCouldn't open a taxonomy file"); obidebug(1, "\nCouldn't open a taxonomy file");
fclose(f);
return NULL; return NULL;
} }
else else
{ {
*count = 0; *count = 0;
fclose(f);
return NULL; return NULL;
} }
} }