|
|
41a6c3 |
Index: modules/aaa/mod_authz_dbd.c
|
|
|
41a6c3 |
===================================================================
|
|
|
41a6c3 |
--- a/modules/aaa/mod_authz_dbd.c (revision 1681106)
|
|
|
41a6c3 |
+++ b/modules/aaa/mod_authz_dbd.c (revision 1681107)
|
|
|
41a6c3 |
@@ -174,7 +174,9 @@
|
|
|
41a6c3 |
action, r->user, message?message:noerror);
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
else if (newuri == NULL) {
|
|
|
41a6c3 |
- newuri = apr_dbd_get_entry(dbd->driver, row, 0);
|
|
|
41a6c3 |
+ newuri =
|
|
|
41a6c3 |
+ apr_pstrdup(r->pool,
|
|
|
41a6c3 |
+ apr_dbd_get_entry(dbd->driver, row, 0));
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
/* we can't break out here or row won't get cleaned up */
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
@@ -204,7 +206,6 @@
|
|
|
41a6c3 |
apr_dbd_prepared_t *query;
|
|
|
41a6c3 |
apr_dbd_results_t *res = NULL;
|
|
|
41a6c3 |
apr_dbd_row_t *row = NULL;
|
|
|
41a6c3 |
- const char **group;
|
|
|
41a6c3 |
|
|
|
41a6c3 |
if (cfg->query == NULL) {
|
|
|
41a6c3 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01649)
|
|
|
41a6c3 |
@@ -224,8 +225,9 @@
|
|
|
41a6c3 |
rv != -1;
|
|
|
41a6c3 |
rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
|
|
|
41a6c3 |
if (rv == 0) {
|
|
|
41a6c3 |
- group = apr_array_push(groups);
|
|
|
41a6c3 |
- *group = apr_dbd_get_entry(dbd->driver, row, 0);
|
|
|
41a6c3 |
+ APR_ARRAY_PUSH(groups, const char *) =
|
|
|
41a6c3 |
+ apr_pstrdup(r->pool,
|
|
|
41a6c3 |
+ apr_dbd_get_entry(dbd->driver, row, 0));
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
else {
|
|
|
41a6c3 |
message = apr_dbd_error(dbd->driver, dbd->handle, rv);
|
|
|
41a6c3 |
Index: modules/session/mod_session_dbd.c
|
|
|
41a6c3 |
===================================================================
|
|
|
41a6c3 |
--- a/modules/session/mod_session_dbd.c (revision 1681106)
|
|
|
41a6c3 |
+++ b/modules/session/mod_session_dbd.c (revision 1681107)
|
|
|
41a6c3 |
@@ -138,7 +138,8 @@
|
|
|
41a6c3 |
return APR_EGENERAL;
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
if (*val == NULL) {
|
|
|
41a6c3 |
- *val = apr_dbd_get_entry(dbd->driver, row, 0);
|
|
|
41a6c3 |
+ *val = apr_pstrdup(r->pool,
|
|
|
41a6c3 |
+ apr_dbd_get_entry(dbd->driver, row, 0));
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
/* we can't break out here or row won't get cleaned up */
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
Index: modules/mappers/mod_rewrite.c
|
|
|
41a6c3 |
===================================================================
|
|
|
41a6c3 |
--- a/modules/mappers/mod_rewrite.c (revision 1681106)
|
|
|
41a6c3 |
+++ b/modules/mappers/mod_rewrite.c (revision 1681107)
|
|
|
41a6c3 |
@@ -1352,12 +1352,14 @@
|
|
|
41a6c3 |
while ((rv = apr_dbd_get_row(db->driver, r->pool, res, &row, -1)) == 0) {
|
|
|
41a6c3 |
++n;
|
|
|
41a6c3 |
if (ret == NULL) {
|
|
|
41a6c3 |
- ret = apr_dbd_get_entry(db->driver, row, 0);
|
|
|
41a6c3 |
+ ret = apr_pstrdup(r->pool,
|
|
|
41a6c3 |
+ apr_dbd_get_entry(db->driver, row, 0));
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
else {
|
|
|
41a6c3 |
/* randomise crudely amongst multiple results */
|
|
|
41a6c3 |
if ((double)rand() < (double)RAND_MAX/(double)n) {
|
|
|
41a6c3 |
- ret = apr_dbd_get_entry(db->driver, row, 0);
|
|
|
41a6c3 |
+ ret = apr_pstrdup(r->pool,
|
|
|
41a6c3 |
+ apr_dbd_get_entry(db->driver, row, 0));
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
@@ -1370,11 +1372,11 @@
|
|
|
41a6c3 |
case 0:
|
|
|
41a6c3 |
return NULL;
|
|
|
41a6c3 |
case 1:
|
|
|
41a6c3 |
- return apr_pstrdup(r->pool, ret);
|
|
|
41a6c3 |
+ return ret;
|
|
|
41a6c3 |
default:
|
|
|
41a6c3 |
/* what's a fair rewritelog level for this? */
|
|
|
41a6c3 |
rewritelog((r, 3, NULL, "Multiple values found for %s", key));
|
|
|
41a6c3 |
- return apr_pstrdup(r->pool, ret);
|
|
|
41a6c3 |
+ return ret;
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
}
|
|
|
41a6c3 |
|