summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xmain/streams/streams.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6a79f607cd..dc0a65b672 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ PHP NEWS
- Fixed many bugs in OCI8. (Tony)
- Fixed crash and leak in mysqli when using 4.1.x client libraries and
connecting to 5.x server. (Andrey)
+- Fixed bug #35740 (memory leak when including a directory). (Tony)
- Fixed bug #35723 (xmlrpc_introspection.c fails compile per C99 std). (Jani)
- Fixed bug #35720 (A final constructor can be overwritten). (Marcus)
- Fixed bug #35713 (getopt() returns array with numeric strings when passed
diff --git a/main/streams/streams.c b/main/streams/streams.c
index e5858619d4..6a3b3848b3 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1831,6 +1831,10 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio
if (stream == NULL && (options & REPORT_ERRORS)) {
php_stream_display_wrapper_errors(wrapper, path, "failed to open stream" TSRMLS_CC);
+ if (opened_path && *opened_path) {
+ efree(*opened_path);
+ *opened_path = NULL;
+ }
}
php_stream_tidy_wrapper_error_log(wrapper TSRMLS_CC);
#if ZEND_DEBUG