--- httpd-2.4.12/modules/aaa/mod_authz_dbd.c	2014-01-21 17:45:04.000000000 +0100
+++ httpd-2.4.12/modules/aaa/mod_authz_dbd.c	2015-05-11 22:36:41.766996213 +0200
@@ -205,6 +205,8 @@ static int authz_dbd_group_query(request
     apr_dbd_results_t *res = NULL;
     apr_dbd_row_t *row = NULL;
     const char **group;
+    const char* tstring;
+    char* tval;
 
     if (cfg->query == NULL) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01649)
@@ -225,7 +227,10 @@ static int authz_dbd_group_query(request
              rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
             if (rv == 0) {
                 group = apr_array_push(groups);
-                *group = apr_dbd_get_entry(dbd->driver, row, 0);
+                tstring = apr_dbd_get_entry(dbd->driver, row, 0);
+                tval = apr_pcalloc(r->pool, strlen(tstring) + 1);
+                strcpy(tval, tstring);
+              *group = tval;
             }
             else {
                 message = apr_dbd_error(dbd->driver, dbd->handle, rv);
