Skip to content

Commit

Permalink
Reset fd after closing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
kareem-wolfssl committed May 28, 2024
1 parent 288b63c commit 54b3613
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wolfcrypt/src/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,7 @@ int wc_FreeRng(WC_RNG* rng)
#ifndef USE_WINDOWS_API
if(rng->seed.fd != 0 && rng->seed.fd != -1) {
close(rng->seed.fd);
rng->seed.fd = -1;
}
#endif

Expand Down

0 comments on commit 54b3613

Please sign in to comment.