From 12ce650f0327acdd7e1f7dcffc24f9a8a4a5466c Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 20 May 2003 18:12:07 +0000 Subject: [PATCH] MFH --- ext/pcre/php_pcre.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.50.1