summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-06-13 11:20:00 +0200
committerKarolin Seeger <kseeger@samba.org>2018-06-26 09:19:17 +0200
commit9b5f368a62b644825e6a04ab31d2cbbf72a196ae (patch)
treef40aa2c4f3420facf3cf438b2150d359be4a8855 /lib
parent1fb72464150bb64effa79a2c07b83f7167e1b75b (diff)
downloadsamba-9b5f368a62b644825e6a04ab31d2cbbf72a196ae.tar.gz
ldb_tdb: Use mem_ctx and so avoid leak onto long-term memory on duplicated add.
After a duplicated add a small amount of memory can be leaked onto a long-term context. Found by Andrej Gessel https://github.com/andiges https://github.com/samba-team/samba/commit/e8fb45125e6a279b918694668e0d4fbddac10aee#commitcomment-29334102 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13471 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 15 04:39:41 CEST 2018 on sn-devel-144 (cherry picked from commit f4f3abfa0e18bb4968b37b1cac40cd8c185c8d7b)
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/ldb_tdb/ldb_tdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index 8802a31c761..f2d179c7db6 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -575,7 +575,7 @@ static int ltdb_add_internal(struct ldb_module *module,
if (mem_ctx == NULL) {
return ldb_module_operr(module);
}
- ret2 = ltdb_search_base(module, module,
+ ret2 = ltdb_search_base(module, mem_ctx,
msg->dn, &dn2);
TALLOC_FREE(mem_ctx);
if (ret2 == LDB_SUCCESS) {