From: Jani Taskinen Date: Tue, 8 Dec 2009 08:21:25 +0000 (+0000) Subject: MF52: Fixed memory leak on require() error (Thanks again Ilia. r220154) X-Git-Tag: php-5.4.0alpha1~191^2~2287 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e85963631de4f4833e0eb98c8e9f4c765b9ac67c;p=php MF52: Fixed memory leak on require() error (Thanks again Ilia. r220154) --- diff --git a/main/main.c b/main/main.c index 8d9904e3f5..64059a1515 100644 --- a/main/main.c +++ b/main/main.c @@ -883,8 +883,6 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c if (docref_buf) { efree(docref_buf); } - php_error(type, "%s", message); - efree(message); if (PG(track_errors) && module_initialized && (!EG(user_error_handler) || !(EG(user_error_handler_error_reporting) & type))) { @@ -899,6 +897,9 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c } } efree(buffer); + + php_error(type, "%s", message); + efree(message); } /* }}} */