From 54b36137b9cc59820498667f26d84de01f641981 Mon Sep 17 00:00:00 2001 From: Kareem Date: Tue, 28 May 2024 16:15:19 -0700 Subject: [PATCH] Reset fd after closing it. --- wolfcrypt/src/random.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 21d46ba1ba..7141c97ad9 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -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