diff options
| author | Antony Dovgal <tony2001@php.net> | 2005-12-20 09:47:57 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2005-12-20 09:47:57 +0000 |
| commit | aec3b4e73c81684ef4d3f84bbd84dde8e5926bd9 (patch) | |
| tree | 4c0467b5fe4cf77cef27f47f0fd86e45555aed5d | |
| parent | 4e09db1dbfdc5c3654c4b5352174d224075d4b0e (diff) | |
| download | php-git-aec3b4e73c81684ef4d3f84bbd84dde8e5926bd9.tar.gz | |
fix #35740 (memory leak when including a directory)
| -rw-r--r-- | NEWS | 1 | ||||
| -rwxr-xr-x | main/streams/streams.c | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -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 |
