summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 67589abed0..6614507c50 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1792,7 +1792,11 @@ bool samdb_is_pdc(struct ldb_context *ldb)
goto failed;
}
- pdc = ldb_msg_find_attr_as_dn(ldb, tmp_ctx, dom_res->msgs[0], "fSMORoleOwner");
+ pdc = ldb_msg_find_attr_as_dn(ldb, tmp_ctx, dom_res->msgs[0],
+ "fSMORoleOwner");
+ if (pdc == NULL) {
+ goto failed;
+ }
if (ldb_dn_compare(samdb_ntds_settings_dn(ldb), pdc) == 0) {
is_pdc = true;