From: Leigh Date: Fri, 27 Mar 2015 19:14:33 +0000 (+0100) Subject: Close fd at the end, otherwise people complain X-Git-Tag: php-5.5.26RC1~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7952b90cad735e2a588c305d425c24550b3775d;p=php Close fd at the end, otherwise people complain Even though it's closed when the process terminates! --- diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 5f14a9274d..194660d864 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -491,6 +491,14 @@ static PHP_MSHUTDOWN_FUNCTION(mcrypt) /* {{{ */ php_stream_filter_unregister_factory("mcrypt.*" TSRMLS_CC); php_stream_filter_unregister_factory("mdecrypt.*" TSRMLS_CC); + if (MCG(fd[RANDOM]) > 0) { + close(MCG(fd[RANDOM])); + } + + if (MCG(fd[URANDOM]) > 0) { + close(MCG(fd[URANDOM])); + } + UNREGISTER_INI_ENTRIES(); return SUCCESS; }