From e85963631de4f4833e0eb98c8e9f4c765b9ac67c Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Tue, 8 Dec 2009 08:21:25 +0000 Subject: [PATCH] MF52: Fixed memory leak on require() error (Thanks again Ilia. r220154) --- main/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } /* }}} */ -- 2.50.1