diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 8c7bf18b558..89a55a866d8 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -60,7 +60,7 @@ static void php_free_pcre_cache(void *data) pcre_cache_entry *pce = (pcre_cache_entry *) data; pefree(pce->re, 1); #if HAVE_SETLOCALE - pefree((void*)pce->tables, 1); + if ((void*)pce->tables) pefree((void*)pce->tables, 1); #endif }