From: Antony Dovgal Date: Tue, 20 Dec 2005 09:48:24 +0000 (+0000) Subject: MFB: fix #35740 (memory leak when including a directory) X-Git-Tag: RELEASE_1_0_4~314 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a1418872569c27332be0c4ea116c95a5159c605;p=php MFB: fix #35740 (memory leak when including a directory) --- diff --git a/main/streams/streams.c b/main/streams/streams.c index 4ac17dcc7f..c9430fe73c 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2485,6 +2485,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