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