summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-17 12:42:15 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-17 06:21:17 +0200
commita7b8e9f562780dc6a3487644623decd1cff226e2 (patch)
tree869eaf804e58ddf1b93a84e42684f9f426752bfa
parent21c8fa2566eb2b5a8e1e5c727b22f56479a3da46 (diff)
downloadsamba-a7b8e9f562780dc6a3487644623decd1cff226e2.tar.gz
samba-a7b8e9f562780dc6a3487644623decd1cff226e2.tar.bz2
samba-a7b8e9f562780dc6a3487644623decd1cff226e2.zip
s4-dsdb: Ensure we always free tmp_ctx in schema refresh check
This was found based on a log provided by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>. Thanks Ricky! In that log, over 2.5 days this particular allocation was repeated: 1715099 talloc_new: ../source4/dsdb/samdb/ldb_modules/schema_load.c:120 contains 0 bytes in 1 blocks Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 17 06:21:18 CEST 2012 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_load.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c b/source4/dsdb/samdb/ldb_modules/schema_load.c
index 82ae7d84dd..be7915e03c 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_load.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_load.c
@@ -131,8 +131,10 @@ static int schema_metadata_get_uint64(struct ldb_module *module,
if (!tdb_data.dptr) {
if (tdb_error(tdb) == TDB_ERR_NOEXIST) {
*value = default_value;
+ talloc_free(tmp_ctx);
return LDB_SUCCESS;
} else {
+ talloc_free(tmp_ctx);
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
tdb_errorstr_compat(tdb));
}