From ea12adf544ffaf86a7b323c60c7f9dfbede87808 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 4 Mar 2011 10:49:47 +0100 Subject: s4/ldb - remove now superflous "ldb_dn_validate" checks If we immediately afterwards perform an LDB base operation then we don't need an explicit "ldb_dn_validate" check anymore (only OOM makes sense). Reviewed by: Tridge --- source4/dsdb/common/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/common/util.c') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index d0efa057e7..2563b40ebd 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -3761,9 +3761,9 @@ int dsdb_search_by_dn_guid(struct ldb_context *ldb, int ret; dn = ldb_dn_new_fmt(tmp_ctx, ldb, "", GUID_string(tmp_ctx, guid)); - if (!ldb_dn_validate(dn)) { + if (dn == NULL) { talloc_free(tmp_ctx); - return LDB_ERR_INVALID_DN_SYNTAX; + return ldb_oom(ldb); } ret = dsdb_search_dn(ldb, mem_ctx, _res, dn, attrs, dsdb_flags); -- cgit