mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
r19362: - don't need to store the baseinfo message after cache load
- set better names on talloc structures in ldb modules, making leaks easier to track down
This commit is contained in:
parent
1581babfb5
commit
3bf76db42d
@ -266,6 +266,7 @@ int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, str
|
|||||||
if (current == NULL) {
|
if (current == NULL) {
|
||||||
return LDB_ERR_OPERATIONS_ERROR;
|
return LDB_ERR_OPERATIONS_ERROR;
|
||||||
}
|
}
|
||||||
|
talloc_set_name(current, "ldb_module: %s", module_list[i]);
|
||||||
|
|
||||||
current->ldb = ldb;
|
current->ldb = ldb;
|
||||||
current->ops = ops;
|
current->ops = ops;
|
||||||
|
@ -776,6 +776,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
|
|||||||
talloc_free(ildb);
|
talloc_free(ildb);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
talloc_set_name_const(*module, "ldb_ildap backend");
|
||||||
(*module)->ldb = ldb;
|
(*module)->ldb = ldb;
|
||||||
(*module)->prev = (*module)->next = NULL;
|
(*module)->prev = (*module)->next = NULL;
|
||||||
(*module)->private_data = ildb;
|
(*module)->private_data = ildb;
|
||||||
|
@ -822,6 +822,7 @@ static int lldb_connect(struct ldb_context *ldb,
|
|||||||
talloc_free(lldb);
|
talloc_free(lldb);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
talloc_set_name_const(*module, "ldb_ldap backend");
|
||||||
(*module)->ldb = ldb;
|
(*module)->ldb = ldb;
|
||||||
(*module)->prev = (*module)->next = NULL;
|
(*module)->prev = (*module)->next = NULL;
|
||||||
(*module)->private_data = lldb;
|
(*module)->private_data = lldb;
|
||||||
|
@ -2101,6 +2101,7 @@ static int lsqlite3_connect(struct ldb_context *ldb,
|
|||||||
ldb_oom(ldb);
|
ldb_oom(ldb);
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
talloc_set_name_const(*module, "ldb_sqlite3 backend");
|
||||||
(*module)->ldb = ldb;
|
(*module)->ldb = ldb;
|
||||||
(*module)->prev = (*module)->next = NULL;
|
(*module)->prev = (*module)->next = NULL;
|
||||||
(*module)->private_data = lsqlite3;
|
(*module)->private_data = lsqlite3;
|
||||||
|
@ -1058,11 +1058,18 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
|
|||||||
talloc_free(ltdb);
|
talloc_free(ltdb);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
talloc_set_name_const(*module, "ldb_tdb backend");
|
||||||
(*module)->ldb = ldb;
|
(*module)->ldb = ldb;
|
||||||
(*module)->prev = (*module)->next = NULL;
|
(*module)->prev = (*module)->next = NULL;
|
||||||
(*module)->private_data = ltdb;
|
(*module)->private_data = ltdb;
|
||||||
(*module)->ops = <db_ops;
|
(*module)->ops = <db_ops;
|
||||||
|
|
||||||
|
if (ltdb_cache_load(*module) != 0) {
|
||||||
|
talloc_free(*module);
|
||||||
|
talloc_free(ltdb);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user