Skip to content

Commit

Permalink
Merge bitcoin#498: tests: Avoid calling fclose(...) with an invalid a…
Browse files Browse the repository at this point in the history
…rgument

5aae5b5 Avoid calling fclose(...) with an invalid argument (practicalswift)

Pull request description:

  Avoid calling `fclose(...)` with an invalid argument.

Tree-SHA512: f1a057b8c52089a3af1d9bfe97b751a4003b944d293147855eca452d1766c4ead5701d06f546153e654c9cb07b3fe2bcc4e28c8a54a27263d1e2434be123ca3b
  • Loading branch information
gmaxwell committed Feb 6, 2018
2 parents f99aa8d + 5aae5b5 commit 7f9c1a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -4929,7 +4929,9 @@ int main(int argc, char **argv) {
seed16[6] ^= t >> 48;
seed16[7] ^= t >> 56;
}
fclose(frand);
if (frand) {
fclose(frand);
}
}
secp256k1_rand_seed(seed16);

Expand Down

0 comments on commit 7f9c1a1

Please sign in to comment.