]> granicus.if.org Git - php/commitdiff
MF52: Fixed memory leak on require() error (Thanks again Ilia. r220154)
authorJani Taskinen <jani@php.net>
Tue, 8 Dec 2009 08:21:25 +0000 (08:21 +0000)
committerJani Taskinen <jani@php.net>
Tue, 8 Dec 2009 08:21:25 +0000 (08:21 +0000)
main/main.c

index 8d9904e3f5ba0f5daa1d9d4ef32adbc27c8cd6b7..64059a1515a0fc1004e88b963d0c52113ab8217a 100644 (file)
@@ -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);
 }
 /* }}} */