summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 9b05d98a66..bf90115f51 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -142,8 +142,12 @@ struct TDB_DATA ltdb_key(struct ldb_module *module, struct ldb_dn *dn)
goto failed;
}
- key_str = talloc_asprintf(ldb, "DN=%s", dn_folded);
+ key_str = talloc_strdup(ldb, "DN=");
+ if (!key_str) {
+ goto failed;
+ }
+ key_str = talloc_append_string(ldb, key_str, dn_folded);
if (!key_str) {
goto failed;
}