1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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
This commit is contained in:
Andrew Bartlett 2012-08-17 12:42:15 +10:00
parent 21c8fa2566
commit a7b8e9f562

View File

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