cvs: php4 /ext/pcre php_pcre.c

From: Date: Sat, 09 Nov 2002 00:43:37 +0000
Subject: cvs: php4 /ext/pcre php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-15920@lists.php.net to get a copy of this message
andrei Fri Nov 8 19:43:37 2002 EDT Modified files: /php4/ext/pcre php_pcre.c Log: Fix memory leak in non-ZTS mode. Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.130 php4/ext/pcre/php_pcre.c:1.131 --- php4/ext/pcre/php_pcre.c:1.130 Thu Oct 24 15:06:19 2002 +++ php4/ext/pcre/php_pcre.c Fri Nov 8 19:43:37 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.130 2002/10/24 19:06:19 helly Exp $ */ +/* $Id: php_pcre.c,v 1.131 2002/11/09 00:43:37 andrei Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -76,12 +76,10 @@ zend_hash_init(&pcre_globals->pcre_cache, 0, NULL, php_free_pcre_cache, 1); } -#ifdef ZTS static void php_pcre_shutdown_globals(zend_pcre_globals *pcre_globals TSRMLS_DC) { zend_hash_destroy(&pcre_globals->pcre_cache); } -#endif static /* {{{ PHP_MINFO_FUNCTION(pcre) */ @@ -113,6 +111,10 @@ /* {{{ PHP_MSHUTDOWN_FUNCTION(pcre) */ static PHP_MSHUTDOWN_FUNCTION(pcre) { +#ifndef ZTS + php_pcre_shutdown_globals(&pcre_globals TSRMLS_CC); +#endif + return SUCCESS; } /* }}} */

« previous php.cvs (#15920) next »