summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-09-18 03:29:21 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-09-18 03:29:21 +0000
commit5aa6dcc6c8e5965c75e138481e101528de37b14d (patch)
tree037a63a8f26a36297d4c48c6ac61b29e2fc74726
parent442112503a765fc08bb03e5b54f294a51dc84580 (diff)
downloadphp-git-5aa6dcc6c8e5965c75e138481e101528de37b14d.tar.gz
Fixed memory leak on require() error
-rw-r--r--main/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/main.c b/main/main.c
index cc44717432..aefeeb1a4b 100644
--- a/main/main.c
+++ b/main/main.c
@@ -571,8 +571,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(active_symbol_table)) {
zval *tmp;
@@ -581,6 +579,9 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) &tmp, sizeof(zval *), NULL);
}
efree(buffer);
+
+ php_error(type, "%s", message);
+ efree(message);
}
/* }}} */