Skip to content

Commit 7f9c1a1

Browse files
committed
Merge bitcoin#498: tests: Avoid calling fclose(...) with an invalid argument
5aae5b5 Avoid calling fclose(...) with an invalid argument (practicalswift) Pull request description: Avoid calling `fclose(...)` with an invalid argument. Tree-SHA512: f1a057b8c52089a3af1d9bfe97b751a4003b944d293147855eca452d1766c4ead5701d06f546153e654c9cb07b3fe2bcc4e28c8a54a27263d1e2434be123ca3b
2 parents f99aa8d + 5aae5b5 commit 7f9c1a1

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
@@ -4929,7 +4929,9 @@ int main(int argc, char **argv) {
49294929
seed16[6] ^= t >> 48;
49304930
seed16[7] ^= t >> 56;
49314931
}
4932-
fclose(frand);
4932+
if (frand) {
4933+
fclose(frand);
4934+
}
49334935
}
49344936
secp256k1_rand_seed(seed16);
49354937

0 commit comments

Comments
 (0)