From cd4a725154562237097f174f23a7f96a58adb989 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Baumbach?= Date: Mon, 10 Feb 2025 17:42:12 +0100 Subject: [PATCH] libnet4: free tevent request even on error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=15798 Signed-off-by: Björn Baumbach Reviewed-by: Volker Lendecke Autobuild-User(master): Björn Baumbach Autobuild-Date(master): Tue Feb 11 11:05:37 UTC 2025 on atb-devel-224 (cherry picked from commit 8f72b5673e6a26c5a6a69dbc56e91027d0dabe37) Autobuild-User(v4-22-test): Jule Anger Autobuild-Date(v4-22-test): Wed Feb 12 11:37:37 UTC 2025 on atb-devel-224 --- source4/libnet/libnet_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index 26cf26fe3e1..fe021b9f4d8 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -223,10 +223,10 @@ NTSTATUS libnet_LookupDCs_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS status; struct finddcs finddcs_io; status = finddcs_cldap_recv(req, mem_ctx, &finddcs_io); + talloc_free(req); if (!NT_STATUS_IS_OK(status)) { return status; } - talloc_free(req); io->out.num_dcs = 1; io->out.dcs = talloc(mem_ctx, struct nbt_dc_name); NT_STATUS_HAVE_NO_MEMORY(io->out.dcs); -- 2.47.2