/**
* Load the session by the key specified.
+ *
+ * The session value is allocated using the passed apr_pool_t.
*/
-static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
+static apr_status_t dbd_load(request_rec * r, apr_pool_t *pool,
+ const char *key, const char **val)
{
apr_status_t rv;
return APR_EGENERAL;
}
if (*val == NULL) {
- *val = apr_pstrdup(r->pool,
+ *val = apr_pstrdup(pool,
apr_dbd_get_entry(dbd->driver, row, 0));
}
/* we can't break out here or row won't get cleaned up */
/* load an RFC2109 or RFC2965 compliant cookie */
ap_cookie_read(r, name, &key, conf->remove);
if (key) {
- ret = dbd_load(r, key, &val);
+ ret = dbd_load(r, m->pool, key, &val);
if (ret != APR_SUCCESS) {
return ret;
}
/* load named session */
else if (conf->peruser) {
if (r->user) {
- ret = dbd_load(r, r->user, &val);
+ ret = dbd_load(r, m->pool, r->user, &val);
if (ret != APR_SUCCESS) {
return ret;
}