com php-src: fixed memory leak: ext/pcre/php_pcre.c
| From: | Dmitry Stogov | Date: | Fri, 20 Jun 2014 11:04:25 +0000 |
| Subject: | com php-src: fixed memory leak: ext/pcre/php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79004@lists.php.net to get a copy of this message | ||
Commit: 6ea228722b2b928eae3b2c30143eda6290fe1a7b
Author: Dmitry Stogov <dmitry@zend.com> Fri, 20 Jun 2014 15:04:25 +0400
Parents: 629c9d3eda6df5f25701b33033ec13982b1f0d04
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6ea228722b2b928eae3b2c30143eda6290fe1a7b
Log:
fixed memory leak
Changed paths:
M ext/pcre/php_pcre.c
Diff:
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 08f042b..14271d0 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);