diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-03-11 07:11:54 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-03-11 07:11:54 +0000 |
commit | 7bccaefc418212641098556c817117a5687acdb2 (patch) | |
tree | 331426c69b1029560e645c4033d85301e165e1e4 /ext | |
parent | 8b8fcff81b391d89cb791be7d34dc077526ac971 (diff) | |
download | php-git-7bccaefc418212641098556c817117a5687acdb2.tar.gz |
Small memory leak fix that does not matter much.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ereg/ereg.c | 1 | ||||
-rw-r--r-- | ext/standard/reg.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index 6fff6a5352..02e39e401f 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -220,6 +220,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) buf = emalloc(string_len); if (!buf) { php_error(E_WARNING, "Unable to allocate memory in php_ereg"); + regfree(&re); efree(subs); RETURN_FALSE; } diff --git a/ext/standard/reg.c b/ext/standard/reg.c index 6fff6a5352..02e39e401f 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -220,6 +220,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) buf = emalloc(string_len); if (!buf) { php_error(E_WARNING, "Unable to allocate memory in php_ereg"); + regfree(&re); efree(subs); RETURN_FALSE; } |