mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-27 03:22:19 +01:00
Only attempt to close RNG file descriptor on platforms with XCLOSE.
This commit is contained in:
@@ -1377,9 +1377,9 @@ int wc_FreeRng(WC_RNG* rng)
|
||||
ret = WC_HW_E;
|
||||
#endif
|
||||
|
||||
#ifndef USE_WINDOWS_API
|
||||
#ifdef XCLOSE
|
||||
if(rng->seed.fd != 0 && rng->seed.fd != -1) {
|
||||
close(rng->seed.fd);
|
||||
XCLOSE(rng->seed.fd);
|
||||
rng->seed.fd = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user