diff options
Diffstat (limited to 'ext/standard/reg.c')
-rw-r--r-- | ext/standard/reg.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |