]> granicus.if.org Git - php/commitdiff
Small memory leak fix that does not matter much.
authorYasuo Ohgaki <yohgaki@php.net>
Mon, 11 Mar 2002 07:11:54 +0000 (07:11 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Mon, 11 Mar 2002 07:11:54 +0000 (07:11 +0000)
ext/ereg/ereg.c
ext/standard/reg.c

index 6fff6a53524918f8baff25e134c8590cd3239ba5..02e39e401feaf58888060f56691c2fd4ba5c5a7b 100644 (file)
@@ -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;
                }
index 6fff6a53524918f8baff25e134c8590cd3239ba5..02e39e401feaf58888060f56691c2fd4ba5c5a7b 100644 (file)
@@ -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;
                }