diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-17 01:21:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:17 -0500 |
commit | e36ea2e8ebe44079dd3989694f0235e77caf4fe2 (patch) | |
tree | 35b7b7ae23ff313520cefc376dfa0fe8aecd5095 /source4/lib/ldb | |
parent | 5535b43efd297deb31c900a60762af1642779278 (diff) | |
download | samba-e36ea2e8ebe44079dd3989694f0235e77caf4fe2.tar.gz samba-e36ea2e8ebe44079dd3989694f0235e77caf4fe2.tar.bz2 samba-e36ea2e8ebe44079dd3989694f0235e77caf4fe2.zip |
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 used to be commit 3bf76db42dc6dde5d71083216dba819869b31c75)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 1 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_ildap/ldb_ildap.c | 1 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_ldap/ldb_ldap.c | 1 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 1 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 7 |
5 files changed, 11 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index d627f3b9fa..325cab6dfd 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -266,6 +266,7 @@ int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, str if (current == NULL) { return LDB_ERR_OPERATIONS_ERROR; } + talloc_set_name(current, "ldb_module: %s", module_list[i]); current->ldb = ldb; current->ops = ops; diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index 5b69ac06c9..3843d2b825 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -776,6 +776,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url, talloc_free(ildb); return -1; } + talloc_set_name_const(*module, "ldb_ildap backend"); (*module)->ldb = ldb; (*module)->prev = (*module)->next = NULL; (*module)->private_data = ildb; diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index a34e35c6db..410ad64b4a 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -822,6 +822,7 @@ static int lldb_connect(struct ldb_context *ldb, talloc_free(lldb); return -1; } + talloc_set_name_const(*module, "ldb_ldap backend"); (*module)->ldb = ldb; (*module)->prev = (*module)->next = NULL; (*module)->private_data = lldb; diff --git a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c index 91256222b1..8dd25db1d6 100644 --- a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c +++ b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c @@ -2101,6 +2101,7 @@ static int lsqlite3_connect(struct ldb_context *ldb, ldb_oom(ldb); goto failed; } + talloc_set_name_const(*module, "ldb_sqlite3 backend"); (*module)->ldb = ldb; (*module)->prev = (*module)->next = NULL; (*module)->private_data = lsqlite3; diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index b7a202442d..fd1c8780ae 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1058,11 +1058,18 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, talloc_free(ltdb); return -1; } + talloc_set_name_const(*module, "ldb_tdb backend"); (*module)->ldb = ldb; (*module)->prev = (*module)->next = NULL; (*module)->private_data = ltdb; (*module)->ops = <db_ops; + if (ltdb_cache_load(*module) != 0) { + talloc_free(*module); + talloc_free(ltdb); + return -1; + } + return 0; } |