diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c b/source4/dsdb/samdb/ldb_modules/schema_load.c index 82ae7d84dd3..be7915e03cb 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)); }