Skip to content

Commit 7bc47a4

Browse files
authored
Add missing fclose (#344)
Co-authored-by: Chun-Hung Tseng <chun-hung.tseng@swisscom.com>
1 parent 44571c2 commit 7bc47a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/emulate.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,4 +1210,7 @@ void dump_registers(riscv_t *rv, char *out_file_path)
12101210
fprintf(f, " \"x%d\": %u%s\n", i, rv->X[i], comma);
12111211
}
12121212
fprintf(f, "}\n");
1213+
1214+
if (out_file_path[0] != '-')
1215+
fclose(f);
12131216
}

0 commit comments

Comments
 (0)