mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
Avoid leaking the urandom fd
When Apache is reloaded, it unloads the extension, but the open file descriptor to /dev/urandom is left hanging around and is leaked. This fixes the bug. Duplicate of https://github.com/jedisct1/libsodium-php/pull/173
This commit is contained in:
parent
0bafb530d6
commit
695b8192c7
@ -637,6 +637,7 @@ PHP_MINIT_FUNCTION(sodium)
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(sodium)
|
||||
{
|
||||
randombytes_close();
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user