From 3a0047eaf18a1dffdedfd6625aeac9f6d7255045 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 3 Sep 2019 10:35:33 +0200 Subject: [PATCH] dsdb: Fix CID 1453464: Error handling issues (CHECKED_RETURN) Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source4/dsdb/schema/schema_set.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 943d0ef49f5..2ee2596570e 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -904,6 +904,7 @@ int dsdb_schema_fill_extended_dn(struct ldb_context *ldb, struct dsdb_schema *sc const struct ldb_val *rdn; struct ldb_val guid; NTSTATUS status; + int ret; struct ldb_dn *dn = ldb_dn_new(NULL, ldb, cur->defaultObjectCategory); if (!dn) { @@ -925,7 +926,12 @@ int dsdb_schema_fill_extended_dn(struct ldb_context *ldb, struct dsdb_schema *sc talloc_free(dn); return ldb_operr(ldb); } - ldb_dn_set_extended_component(dn, "GUID", &guid); + ret = ldb_dn_set_extended_component(dn, "GUID", &guid); + if (ret != LDB_SUCCESS) { + ret = ldb_error(ldb, ret, "Could not set GUID"); + talloc_free(dn); + return ret; + } cur->defaultObjectCategory = ldb_dn_get_extended_linearized(cur, dn, 1); talloc_free(dn);