summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping_ldb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index 5d350e477c..29d5b49edf 100644
--- a/source3/groupdb/mapping_ldb.c
+++ b/source3/groupdb/mapping_ldb.c
@@ -667,7 +667,10 @@ static BOOL mapping_upgrade(const char *tdb_path)
ret = tdb_traverse(tdb, upgrade_alias_record, &status);
if (ret == -1 || status == -1) goto failed;
- if (tdb) tdb_close(tdb);
+ if (tdb) {
+ tdb_close(tdb);
+ tdb = NULL;
+ }
pstrcpy(old_path, tdb_path);
pstrcpy(new_path, lock_path("group_mapping.tdb.upgraded"));