Skip to content

Commit 5aae5b5

Browse files
Avoid calling fclose(...) with an invalid argument
1 parent c95f6f1 commit 5aae5b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tests.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -4924,7 +4924,9 @@ int main(int argc, char **argv) {
49244924
seed16[6] ^= t >> 48;
49254925
seed16[7] ^= t >> 56;
49264926
}
4927-
fclose(frand);
4927+
if (frand) {
4928+
fclose(frand);
4929+
}
49284930
}
49294931
secp256k1_rand_seed(seed16);
49304932

0 commit comments

Comments
 (0)