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;
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to