1
0
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:
Andrew Tridgell 2006-10-17 01:21:02 +00:00 committed by Gerald (Jerry) Carter
parent 1581babfb5
commit 3bf76db42d
5 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 = &ltdb_ops; (*module)->ops = &ltdb_ops;
if (ltdb_cache_load(*module) != 0) {
talloc_free(*module);
talloc_free(ltdb);
return -1;
}
return 0; return 0;
} }