summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_tdb2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index 1db880a48b..f7935fb3b9 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -329,9 +329,6 @@ static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom,
struct idmap_tdb2_context *ctx;
NTSTATUS status;
- status = idmap_tdb2_open_db();
- NT_STATUS_NOT_OK_RETURN(status);
-
ctx = talloc(dom, struct idmap_tdb2_context);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));
@@ -393,6 +390,11 @@ static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom,
ctx->filter_high_id = 0;
}
+ ret = idmap_tdb2_open_db();
+ if (!NT_STATUS_IS_OK(ret)) {
+ goto failed;
+ }
+
dom->private_data = ctx;
return NT_STATUS_OK;