tony2001 Tue Dec 20 09:48:24 2005 EDT
Modified files:
/php-src/main/streams streams.c
Log:
MFB: fix #35740 (memory leak when including a directory)
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/streams.c?r1=1.91&r2=1.92&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.91 php-src/main/streams/streams.c:1.92
--- php-src/main/streams/streams.c:1.91 Mon Dec 5 23:31:09 2005
+++ php-src/main/streams/streams.c Tue Dec 20 09:48:24 2005
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.91 2005/12/05 23:31:09 sniper Exp $ */
+/* $Id: streams.c,v 1.92 2005/12/20 09:48:24 tony2001 Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -2485,6 +2485,10 @@
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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php