may,
NULL);
if (schema_entry == NULL) {
+ talloc_free(mem_ctx);
DEBUG(0, ("failed to generate schema description for %s\n", name));
return NULL;
}
out = talloc_asprintf_append(out, "objectClasses: %s\n", schema_entry);
break;
default:
- DEBUG(0, ("Wrong type of target!\n"));
+ talloc_free(mem_ctx);
+ DEBUG(0,(__location__ " Wrong type of target %u!", (unsigned)target));
return NULL;
}
talloc_free(mem_ctx);
} else if (strcasecmp(target_str, "fedora-ds") == 0) {
target = TARGET_FEDORA_DS;
} else {
+ talloc_free(mem_ctx);
DEBUG(0, ("Invalid target type for schema conversion %s\n", target_str));
return NULL;
}
schema = dsdb_get_schema(ldb, mem_ctx);
if (!schema) {
+ talloc_free(mem_ctx);
DEBUG(0, ("No schema on ldb to convert!\n"));
return NULL;
}
out = talloc_strdup(mem_ctx, "dn: cn=schema\n");
break;
default:
- DEBUG(0, ("Wrong type of target!\n"));
+ talloc_free(mem_ctx);
+ DEBUG(0,(__location__ " Wrong type of target %u!", (unsigned)target));
return NULL;
}
false, false);
if (schema_entry == NULL) {
+ talloc_free(mem_ctx);
DEBUG(0, ("failed to generate attribute description for %s\n", name));
return NULL;
}
out = talloc_asprintf_append(out, "attributeTypes: %s\n", schema_entry);
break;
default:
- DEBUG(0, ("Wrong type of target!\n"));
+ talloc_free(mem_ctx);
+ DEBUG(0,(__location__ " Wrong type of target %u!", (unsigned)target));
return NULL;
}
}
out = print_schema_recursive(out, schema, "top", target, attrs_skip, attr_map, oid_map);
+ talloc_steal(ldb, out);
+ talloc_free(mem_ctx);
+
return out;
}