diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-07-31 10:54:29 +1200 |
---|---|---|
committer | Garming Sam <garming@samba.org> | 2019-08-20 04:57:10 +0000 |
commit | b6516dbd24df8c78ed909c7ef9058b0844abb917 (patch) | |
tree | 9473662d6c329f2d37a3f6fafc8182a2b45e2d73 /lib | |
parent | ee6537c29e747206ee607493ce15d4532fb670c8 (diff) | |
download | samba-b6516dbd24df8c78ed909c7ef9058b0844abb917.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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/ldb_key_value/ldb_kv_index.c | 1 |
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; } |