ldb-samba: avoid leak in dsdb_match_for_dns_to_tombstone_time
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 10 Mar 2021 03:30:16 +0000 (16:30 +1300)
committerJeremy Allison <jra@samba.org>
Tue, 30 Mar 2021 17:53:30 +0000 (17:53 +0000)
commit56483a2799430d36dcb9036b8a6f5eece959ba9f
treec2bae4f5776f7d94d36a079901e23e890b30b7f1
parent140007bfe1795e5bc5bca43238b6be03e0693f9e
ldb-samba: avoid leak in dsdb_match_for_dns_to_tombstone_time

After the first time through the loop, tmp_ctx has been freed and
NULLed, so we end up allocating on NULL and never freeing.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14659

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/ldb-samba/ldb_matching_rules.c