diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-06-22 01:45:28 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-06-22 01:45:28 +0300 |
commit | f25ecdacf805f840f743b67b6d84485b2deceb4f (patch) | |
tree | f8f6c7606287b952dcdf51e2ee9f528606bb9a2c /main/streams/streams.c | |
parent | 9fb0e6ffe29cc37b6b84a093d7438f0453cc1c41 (diff) | |
download | php-git-f25ecdacf805f840f743b67b6d84485b2deceb4f.tar.gz |
shutdown_executor() refactoring (reuse opcache fast request shutdown code)
Diffstat (limited to 'main/streams/streams.c')
-rw-r--r-- | main/streams/streams.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 25898cd2c4..23d46455c1 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -502,43 +502,13 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov /* we don't work with *stream but need its value for comparison */ zend_hash_apply_with_argument(&EG(persistent_list), _php_stream_free_persistent, stream); } -#if ZEND_DEBUG - if ((close_options & PHP_STREAM_FREE_RSRC_DTOR) && (stream->__exposed == 0) && (EG(error_reporting) & E_WARNING)) { - /* it leaked: Lets deliberately NOT pefree it so that the memory manager shows it - * as leaked; it will log a warning, but lets help it out and display what kind - * of stream it was. */ - if (!CG(unclean_shutdown)) { - char *leakinfo; - spprintf(&leakinfo, 0, __FILE__ "(%d) : Stream of type '%s' %p (path:%s) was not closed\n", __LINE__, stream->ops->label, stream, stream->orig_path); - - if (stream->orig_path) { - pefree(stream->orig_path, stream->is_persistent); - stream->orig_path = NULL; - } -# if defined(PHP_WIN32) - OutputDebugString(leakinfo); -# else - fprintf(stderr, "%s", leakinfo); -# endif - efree(leakinfo); - } - } else { - if (stream->orig_path) { - pefree(stream->orig_path, stream->is_persistent); - stream->orig_path = NULL; - } - - pefree(stream, stream->is_persistent); - } -#else if (stream->orig_path) { pefree(stream->orig_path, stream->is_persistent); stream->orig_path = NULL; } pefree(stream, stream->is_persistent); -#endif } if (context) { |