]> granicus.if.org Git - php/commitdiff
Fixed initialization of global variables in ZTS (this caused valgrind reports on...
authorDmitry Stogov <dmitry@zend.com>
Thu, 12 Feb 2015 13:51:07 +0000 (16:51 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 12 Feb 2015 13:51:07 +0000 (16:51 +0300)
ext/standard/file.c

index 2540c3113efd5e9296f8a0dcf7664a28dd07c55d..2d2bb2780842fb5a1e1f8b6884c20a12eee004e8 100644 (file)
@@ -156,11 +156,8 @@ static ZEND_RSRC_DTOR_FUNC(file_context_dtor)
 
 static void file_globals_ctor(php_file_globals *file_globals_p)
 {
-       FG(pclose_ret) = 0;
-       FG(pclose_wait) = 0;
-       FG(user_stream_current_filename) = NULL;
-       FG(def_chunk_size) = PHP_SOCK_CHUNK_SIZE;
-       FG(wrapper_errors) = NULL;
+       memset(file_globals_p, 0, sizeof(php_file_globals));
+       file_globals_p->def_chunk_size = PHP_SOCK_CHUNK_SIZE;
 }
 
 static void file_globals_dtor(php_file_globals *file_globals_p)