Skip to content

Commit 3e3118d

Browse files
committed
Odin: fix corverity 211470,211469
1 parent b726e44 commit 3e3118d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ODIN_II/SRC/simulate_blif.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,13 +1737,9 @@ static void assign_memory_from_mif_file(nnode_t* node, const char* filename, int
17371737

17381738
FILE* mif = fopen(filename, "r");
17391739
if (!mif) {
1740-
error_message(SIMULATION, temp_loc, "MIF file (%ldx%ld) not found. \n", width, address_width);
1741-
} else {
1742-
fclose(mif);
1740+
error_message(SIMULATION, temp_loc, "MIF file (%dx%ld) not found. \n", width, address_width);
17431741
}
17441742

1745-
rewind(mif);
1746-
17471743
std::unordered_map<std::string, std::string> symbols = std::unordered_map<std::string, std::string>();
17481744

17491745
bool in_content = false;
@@ -1874,6 +1870,7 @@ static void assign_memory_from_mif_file(nnode_t* node, const char* filename, int
18741870

18751871
vtr::free(buffer_in);
18761872
}
1873+
fclose(mif);
18771874
}
18781875

18791876
/*

0 commit comments

Comments
 (0)