]> granicus.if.org Git - php/commitdiff
fix #35740 (memory leak when including a directory)
authorAntony Dovgal <tony2001@php.net>
Tue, 20 Dec 2005 09:47:57 +0000 (09:47 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 20 Dec 2005 09:47:57 +0000 (09:47 +0000)
NEWS
main/streams/streams.c

diff --git a/NEWS b/NEWS
index 6a79f607cd7990acbafa69ae546e2eb469e22a37..dc0a65b672b70414fa3a52b2ffeffbcafbabbc5a 100644 (file)
--- 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 
index e5858619d4df456d289b1fe134d5e7e6db2fc23f..6a3b3848b36ea6ecc4f9ba7b5f250a6030ed2698 100755 (executable)
@@ -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