summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 21b6506fb9..2357ffd7d9 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -604,9 +604,8 @@ static int samldb_fill_object(struct samldb_ctx *ac)
* caller. Use the entry DN for it. */
ac->dn = ac->msg->dn;
- ret = samdb_msg_add_string(ldb, ac->msg, ac->msg,
- "defaultObjectCategory",
- ldb_dn_get_linearized(ac->dn));
+ ret = ldb_msg_add_string(ac->msg, "defaultObjectCategory",
+ ldb_dn_alloc_linearized(ac, ac->dn));
if (ret != LDB_SUCCESS) {
ldb_oom(ldb);
return ret;