summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-21 07:52:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:51 -0500
commitc7ca980ca929e4bf31bd00fb1ac16c8e2e29e222 (patch)
tree7f9db1054c1a61acf51a7c50c8b78aef189672a9
parentc2f9eb30cd558d79f9593ed861e9684ade77c38d (diff)
downloadsamba-c7ca980ca929e4bf31bd00fb1ac16c8e2e29e222.tar.gz
samba-c7ca980ca929e4bf31bd00fb1ac16c8e2e29e222.tar.bz2
samba-c7ca980ca929e4bf31bd00fb1ac16c8e2e29e222.zip
r8665: fixed a segv at high debug level in the web server
thanks to volker for finding this (This used to be commit e02d7753f77327e3ca295a86afde9ea74ddcf5e0)
-rw-r--r--source4/web_server/http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index e7d5c399ce..07a9a3be8d 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -870,20 +870,22 @@ void http_process_input(struct websrv_context *web)
mprSetCtx(edata->application_data);
mprCopyVar(edata->application_data, &esp->variables[ESP_APPLICATION_OBJ],
MPR_DEEP_COPY);
+ mprSetCtx(esp);
/* copy any session data */
if (web->session) {
talloc_free(web->session->data);
web->session->data = talloc_zero(web->session, struct MprVar);
- mprSetCtx(web->session->data);
if (esp->variables[ESP_SESSION_OBJ].properties == NULL ||
esp->variables[ESP_SESSION_OBJ].properties[0].numItems == 0) {
talloc_free(web->session);
web->session = NULL;
} else {
+ mprSetCtx(web->session->data);
mprCopyVar(web->session->data, &esp->variables[ESP_SESSION_OBJ],
MPR_DEEP_COPY);
/* setup the timeout for the session data */
+ mprSetCtx(esp);
talloc_free(web->session->te);
web->session->te = event_add_timed(web->conn->event.ctx, web->session,
timeval_current_ofs(web->session->lifetime, 0),
@@ -895,6 +897,7 @@ void http_process_input(struct websrv_context *web)
return;
internal_error:
+ mprSetCtx(esp);
talloc_free(esp);
http_error(web, 500, "Internal server error");
}