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>
}
if (rec->wType == DNS_TYPE_SOA || rec->wType == DNS_TYPE_NS) {
- TALLOC_FREE(tmp_ctx);
+ TALLOC_FREE(rec);
continue;
}
if (rec->wType == DNS_TYPE_TOMBSTONE) {
- TALLOC_FREE(tmp_ctx);
+ TALLOC_FREE(rec);
continue;
}
if (rec->dwTimeStamp == 0) {
- TALLOC_FREE(tmp_ctx);
+ TALLOC_FREE(rec);
continue;
}
if (rec->dwTimeStamp > tombstone_time) {
- TALLOC_FREE(tmp_ctx);
+ TALLOC_FREE(rec);
continue;
}