diff options
author | Andrei Zmievski <andrei@php.net> | 2003-05-20 18:12:07 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 2003-05-20 18:12:07 +0000 |
commit | 12ce650f0327acdd7e1f7dcffc24f9a8a4a5466c (patch) | |
tree | 2250d57f8a88c0cd5688f766d40f21b630507ba7 /ext/pcre/php_pcre.c | |
parent | 549625a4c72a8f63735ce3aee8ddf060939815bf (diff) | |
download | php-git-12ce650f0327acdd7e1f7dcffc24f9a8a4a5466c.tar.gz |
MFH
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |