summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 606c24491c..a04fb1a8bd 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -1105,7 +1105,7 @@ static int ltdb_index_add1(struct ldb_module *module, const char *dn,
talloc_free(list);
return LDB_ERR_OPERATIONS_ERROR;
}
- list->dn[list->count].data = discard_const_p(unsigned char, dn);
+ list->dn[list->count].data = (uint8_t *)talloc_strdup(list->dn, dn);
list->dn[list->count].length = strlen(dn);
list->count++;