diff options
author | Andrej Gessel <Andrej.Gessel@janztec.com> | 2018-07-16 11:39:05 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-08-15 07:08:24 +0200 |
commit | d645546aef452fc372b7cc7e1602562f0e88943c (patch) | |
tree | aeff41d2929667bcb9ce6a21f249151620b61fd5 /lib | |
parent | b9e2a2de247add415b4681c93849a9c9ba6f3c4a (diff) | |
download | samba-d645546aef452fc372b7cc7e1602562f0e88943c.tar.gz |
fix mem leak in ltdb_index_dn_base_dn and ltdb_search_indexed
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/ldb_key_value/ldb_kv_index.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c index 4e9d9043bfd..6c21c19d654 100644 --- a/lib/ldb/ldb_key_value/ldb_kv_index.c +++ b/lib/ldb/ldb_key_value/ldb_kv_index.c @@ -1684,6 +1684,7 @@ static int ldb_kv_index_dn_base_dn(struct ldb_module *module, dn_list->dn[0].data = discard_const_p(unsigned char, ldb_dn_get_linearized(base_dn)); if (dn_list->dn[0].data == NULL) { + talloc_free(dn_list->dn); return ldb_module_oom(module); } dn_list->dn[0].length = strlen((char *)dn_list->dn[0].data); @@ -2039,6 +2040,7 @@ int ldb_kv_search_indexed(struct ldb_kv_context *ac, uint32_t *match_count) struct dn_list *idx_one_tree_list = talloc_zero(ac, struct dn_list); if (idx_one_tree_list == NULL) { + talloc_free(dn_list); return ldb_module_oom(ac->module); } |