summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-22 11:16:30 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-22 12:47:55 +1100
commit1b48764f24cf2204fb12cc4fa1381fc6bc9e14f4 (patch)
tree68d36542c454569935dc215bfe05a44ca6b69ea9 /source4/lib/ldb
parent129298c9b9793794125558b8334fd5b578ca1112 (diff)
downloadsamba-1b48764f24cf2204fb12cc4fa1381fc6bc9e14f4.tar.gz
samba-1b48764f24cf2204fb12cc4fa1381fc6bc9e14f4.tar.bz2
samba-1b48764f24cf2204fb12cc4fa1381fc6bc9e14f4.zip
s4-ldb: ensure new dn_list elements are not owned by caller
Diffstat (limited to 'source4/lib/ldb')
-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++;