summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--main/main.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c39ef9282f..a107dd61a6 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ PHP NEWS
segfault). (Laruence)
. Fixed bug #64433 (follow_location parameter of context is ignored for most
response codes). (Sergey Akbarov)
+ . Fixed bugs #47675 and #64577 (fd leak on Solaris)
- CURL:
. Add CURL_WRAPPERS_ENABLE constant. (Laruence)
diff --git a/main/main.c b/main/main.c
index be289c8060..7a253f8b23 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2406,8 +2406,8 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
{
zend_file_handle *prepend_file_p, *append_file_p;
zend_file_handle prepend_file = {0}, append_file = {0};
-#if HAVE_BROKEN_GETCWD
- int old_cwd_fd = -1;
+#if HAVE_BROKEN_GETCWD
+ volatile int old_cwd_fd = -1;
#else
char *old_cwd;
ALLOCA_FLAG(use_heap)