From f7952b90cad735e2a588c305d425c24550b3775d Mon Sep 17 00:00:00 2001 From: Leigh Date: Fri, 27 Mar 2015 20:14:33 +0100 Subject: Close fd at the end, otherwise people complain Even though it's closed when the process terminates! --- ext/mcrypt/mcrypt.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; } -- cgit v1.2.1