]> granicus.if.org Git - php/commitdiff
Clear last error before shutting down memory manager
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 25 Jun 2020 14:12:55 +0000 (16:12 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 26 Jun 2020 07:30:08 +0000 (09:30 +0200)
The last error is allocated using ZMM, make sure it's cleared
beforehand.

It would probably be better to allocate it persistently outside
of requests.

main/main.c

index ae6b539ba2588f650dfd8e2ada28bfd0740a6e57..90fec668dd944d40d5dc0ee53a1bed588748160a 100644 (file)
@@ -2449,6 +2449,7 @@ void php_module_shutdown(void)
 
        /* close down the ini config */
        php_shutdown_config();
+       clear_last_error();
 
 #ifndef ZTS
        zend_ini_shutdown();