From: Graham Leggett Date: Sat, 27 Mar 2010 17:48:20 +0000 (+0000) Subject: Make sure we respect the proper pool lifetimes when saving away a preparsed X-Git-Tag: 2.3.6~281 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3aec994376f0716a1cb73d50a2c20644b6c8f6f;p=apache Make sure we respect the proper pool lifetimes when saving away a preparsed session. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@928238 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/session/mod_session_cookie.c b/modules/session/mod_session_cookie.c index b4895489e7..fc04e5cc6d 100644 --- a/modules/session/mod_session_cookie.c +++ b/modules/session/mod_session_cookie.c @@ -137,7 +137,7 @@ static int session_cookie_load(request_rec * r, session_rec ** z) } /* first look in the notes */ - note = apr_pstrcat(r->pool, MOD_SESSION_COOKIE, name, NULL); + note = apr_pstrcat(m->pool, MOD_SESSION_COOKIE, name, NULL); zz = (session_rec *)apr_table_get(m->notes, note); if (zz) { *z = zz; @@ -148,11 +148,11 @@ static int session_cookie_load(request_rec * r, session_rec ** z) ap_cookie_read(r, name, &val, conf->remove); /* create a new session and return it */ - zz = (session_rec *) apr_pcalloc(r->pool, sizeof(session_rec)); - zz->pool = r->pool; - zz->entries = apr_table_make(r->pool, 10); + zz = (session_rec *) apr_pcalloc(m->pool, sizeof(session_rec)); + zz->pool = m->pool; + zz->entries = apr_table_make(m->pool, 10); zz->encoded = val; - zz->uuid = (apr_uuid_t *) apr_pcalloc(r->pool, sizeof(apr_uuid_t)); + zz->uuid = (apr_uuid_t *) apr_pcalloc(m->pool, sizeof(apr_uuid_t)); *z = zz; /* put the session in the notes so we don't have to parse it again */