Skip to content

Commit 7276596

Browse files
committed
Fix exceptional file leak in other/fun/sign.c
1 parent db724df commit 7276596

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

other/fun/sign.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ int load_file(char *filename, char **result)
3636

3737
if (size != fread(*result, sizeof(char), size, f)) {
3838
free(*result);
39+
fclose(f);
3940
return -2; // -2 means file reading fail
4041
}
4142

0 commit comments

Comments
 (0)