summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2019-07-31 10:54:29 +1200
committerKarolin Seeger <kseeger@samba.org>2019-08-26 07:06:19 +0000
commitd819a1c20503484b3624aeda426a37912a4ee692 (patch)
treea2bf140df2f6a0e02c97a216ae03bc0e4aaece90 /lib
parent18fb5fb911d098701e4af732977310e48ed403a9 (diff)
downloadsamba-d819a1c20503484b3624aeda426a37912a4ee692.tar.gz
ldb: Free memory when repacking database
The msg for each database record is allocated on the module context, but never freed. The module seems like it could be a long-running context (as the database would normally get repacked by the samba executable). Even if it's not a proper leak, it shouldn't hurt to cleanup the memory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Aug 20 04:57:10 UTC 2019 on sn-devel-184 (cherry picked from commit b6516dbd24df8c78ed909c7ef9058b0844abb917)
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/ldb_key_value/ldb_kv_index.c1
1 files changed, 1 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 d955517ea10..0853b28fe40 100644
--- a/lib/ldb/ldb_key_value/ldb_kv_index.c
+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c
@@ -3599,6 +3599,7 @@ static int re_pack(struct ldb_kv_private *ldb_kv,
ctx->count);
}
+ talloc_free(msg);
return 0;
}