- module = talloc(ldb, struct ldb_module);
- if (module == NULL) {
- ldb_oom(ldb);
- talloc_free(lldb);
- return -1;
- }
- talloc_set_name_const(module, "ldb_ldap backend");
- module->ldb = ldb;
- module->prev = module->next = NULL;
- module->ops = &lldb_ops;
+ module = ldb_module_new(ldb, ldb, "ldb_ldap backend", &lldb_ops);
+ if (!module) return -1;