From 663fe5530fbfc612ddfdb2579f0d49211455009b Mon Sep 17 00:00:00 2001 From: Anatoliy Atanasov Date: Fri, 11 Sep 2009 18:57:34 +0300 Subject: Handle dsdb_class_by_lDAPDisplayName returned values in schema_inferiors.c --- source4/dsdb/schema/schema_inferiors.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/dsdb/schema/schema_inferiors.c') diff --git a/source4/dsdb/schema/schema_inferiors.c b/source4/dsdb/schema/schema_inferiors.c index 493b425b726..b02d557c588 100644 --- a/source4/dsdb/schema/schema_inferiors.c +++ b/source4/dsdb/schema/schema_inferiors.c @@ -82,6 +82,10 @@ static char **schema_subclasses(struct dsdb_schema *schema, TALLOC_CTX *mem_ctx, for (i=0; oclist && oclist[i]; i++) { struct dsdb_class *schema_class = dsdb_class_by_lDAPDisplayName(schema, oclist[i]); + if (!schema_class) { + DEBUG(0, ("ERROR: Unable to locate subClass: '%s'\n", oclist[i])); + continue; + } list = str_list_append_const(list, schema_class->subclasses); } return list; @@ -104,6 +108,10 @@ static char **schema_posssuperiors(struct dsdb_schema *schema, list3 = schema_supclasses(schema, schema_class); for (i=0; list3 && list3[i]; i++) { struct dsdb_class *class2 = dsdb_class_by_lDAPDisplayName(schema, list3[i]); + if (!class2) { + DEBUG(0, ("ERROR: Unable to locate supClass: '%s'\n", list3[i])); + continue; + } list2 = str_list_append_const(list2, schema_posssuperiors(schema, class2)); } list2 = str_list_append_const(list2, schema_subclasses(schema, list2, list2)); -- cgit v1.2.1