From: Kamen Mazdrashki Date: Fri, 9 Jul 2010 23:29:40 +0000 (+0300) Subject: s4-dsdb: use ldb_msg_canonicalize_ex() in source4/lib/ldb/common/ldb.c X-Git-Url: http://git.samba.org/?p=kamenim%2Fsamba.git;a=commitdiff_plain;h=ff2279affe9951fc093623c950a818b3555a54d7 s4-dsdb: use ldb_msg_canonicalize_ex() in source4/lib/ldb/common/ldb.c --- diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 877f283491..0d73d100d1 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -798,12 +798,13 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *req) /* we have to canonicalise here, as so many places * in modules and backends assume we don't have two * elements with the same name */ - req->op.add.message = ldb_msg_canonicalize(ldb, req->op.add.message); - if (!req->op.add.message) { + ret = ldb_msg_canonicalize_ex(ldb, req->op.add.message, + (TALLOC_CTX*)req, + discard_const(&req->op.add.message)); + if (ret != LDB_SUCCESS) { ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR; } - talloc_steal(req, req->op.add.message); FIRST_OP(ldb, add); ret = module->ops->add(module, req); break;