From 6ea228722b2b928eae3b2c30143eda6290fe1a7b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 20 Jun 2014 15:04:25 +0400 Subject: [PATCH] fixed memory leak --- ext/pcre/php_pcre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);