summaryrefslogtreecommitdiffstats
path: root/modules/session/mod_session_dbd.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2015-05-13 13:34:30 +0200
committerYann Ylavic <ylavic@apache.org>2015-05-13 13:34:30 +0200
commitc1d21475a6c981cf50b7307351639842bc08a627 (patch)
treeb53dd4159f0061564e8ccd33986dfad2273e1c75 /modules/session/mod_session_dbd.c
parentmod_ssl OCSP Stapling: Don't block initial handshakes while refreshing (diff)
downloadapache2-c1d21475a6c981cf50b7307351639842bc08a627.tar.xz
apache2-c1d21475a6c981cf50b7307351639842bc08a627.zip
mod_authn_dbd, mod_authz_dbd, mod_session_dbd, mod_rewrite: Fix lifetime
of DB lookup entries independently of the selected DB engine. PR 46421. Suggested by: Michel Stam <michel reverze net> Proposed by: Steven whitson <steven.whitson gmail com> Reviewed/Extended/Committed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679181 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/session/mod_session_dbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/session/mod_session_dbd.c b/modules/session/mod_session_dbd.c
index a6ab40ea6f..cf65e5af3c 100644
--- a/modules/session/mod_session_dbd.c
+++ b/modules/session/mod_session_dbd.c
@@ -138,7 +138,8 @@ static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
return APR_EGENERAL;
}
if (*val == NULL) {
- *val = apr_dbd_get_entry(dbd->driver, row, 0);
+ *val = apr_pstrdup(r->pool,
+ apr_dbd_get_entry(dbd->driver, row, 0));
}
/* we can't break out here or row won't get cleaned up */
}