diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 08f042bb9e4..14271d00a14 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -91,7 +91,9 @@ static void php_free_pcre_cache(zval *data) /* {{{ */ pcre_cache_entry *pce = (pcre_cache_entry *) Z_PTR_P(data); if (!pce) return; pefree(pce->re, 1); - if (pce->extra) pefree(pce->extra, 1); + if (pce->extra) { + pcre_free_study(pce->extra); + } #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1); pefree(pce->locale, 1);