summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 006789a474..04000a8bb4 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Design: Shane Caraveo <shane@caraveo.com> |
+ | Original design: Shane Caraveo <shane@caraveo.com> |
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
@@ -176,6 +176,8 @@ SAPI_API void sapi_activate(SLS_D)
SG(headers_sent) = 0;
SG(read_post_bytes) = 0;
SG(request_info).post_data = NULL;
+ SG(request_info).current_user = NULL;
+ SG(request_info).current_user_length = 0;
if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) {
SG(request_info).headers_only = 1;
@@ -205,6 +207,9 @@ SAPI_API void sapi_deactivate(SLS_D)
if (SG(request_info).post_data) {
efree(SG(request_info).post_data);
}
+ if (SG(request_info).current_user) {
+ efree(SG(request_info).current_user);
+ }
if (sapi_module.deactivate) {
sapi_module.deactivate(SLS_C);
}