From: Andrei Zmievski Date: Tue, 20 May 2003 18:12:07 +0000 (+0000) Subject: MFH X-Git-Tag: BEFORE_FD_REVERT~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12ce650f0327acdd7e1f7dcffc24f9a8a4a5466c;p=php MFH --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index a18f57b7d8..6aefb0c058 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -56,6 +56,7 @@ static void *php_pcre_malloc(size_t size) static void php_pcre_free(void *ptr) { + if (ptr) pefree(ptr, 1); } @@ -63,6 +64,7 @@ static void php_pcre_free(void *ptr) static void php_free_pcre_cache(void *data) { pcre_cache_entry *pce = (pcre_cache_entry *) data; + if (!pce) return; pefree(pce->re, 1); #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1);