From: Björn Baumbach Date: Mon, 10 Feb 2025 16:42:12 +0000 (+0100) Subject: libnet4: free tevent request even on error X-Git-Tag: tevent-0.17.0~807 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f72b5673e6a26c5a6a69dbc56e91027d0dabe37;p=thirdparty%2Fsamba.git libnet4: free tevent request even on error 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 --- 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);