]> granicus.if.org Git - php/commitdiff
MFB: Fix for bug #27810
authorRasmus Lerdorf <rasmus@php.net>
Fri, 23 Apr 2004 18:08:58 +0000 (18:08 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 23 Apr 2004 18:08:58 +0000 (18:08 +0000)
NEWS
ext/pcre/php_pcre.c

diff --git a/NEWS b/NEWS
index e70fc8a87d9e04c2fd4d6ca83980d514168ee2f7..3f711eb5ec6cfb252d90c276871d8a9a9ed96a2e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ????? 2004, PHP 5 Release Candidate 2
+- Fix for bug #27810 (Joe Orton)
 - Reimplemented zend.ze1_compatibility_mode to have better PHP 4 compliance.
   (Dmitry, Andi)
 - Moved yaz extension to PECL. (Wez)
index 1e0a468c3766d0cb8765afc8107d450fd06b736f..7c848b2e2b5f13509a20e4f6c92f816ac0d5250a 100644 (file)
 
 ZEND_DECLARE_MODULE_GLOBALS(pcre)
 
-
-static void *php_pcre_malloc(size_t size)
-{
-       return pemalloc(size, 1);
-}
-
-
-static void php_pcre_free(void *ptr)
-{
-       if (ptr)
-               pefree(ptr, 1);
-}
-
-
 static void php_free_pcre_cache(void *data)
 {
        pcre_cache_entry *pce = (pcre_cache_entry *) data;
@@ -107,14 +93,6 @@ static PHP_MINIT_FUNCTION(pcre)
        REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE", PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS | CONST_PERSISTENT);
 
-       pcre_malloc = php_pcre_malloc;
-       pcre_free = php_pcre_free;
-
-#ifdef NO_RECURSE
-       pcre_stack_malloc = php_pcre_malloc;
-       pcre_stack_free = php_pcre_free;
-#endif
-       
        return SUCCESS;
 }
 /* }}} */
@@ -560,7 +538,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
                                        }
                                }
 
-                               php_pcre_free((void *) stringlist);
+                               pcre_free((void *) stringlist);
                        }
                }
                else { /* Failed to match */