From 32df5e4961cf064b72bb496157cc6092126d9b8e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 28 Sep 2022 14:14:41 +0200 Subject: [PATCH] s3:auth_samba4: make use of imessaging_init_discard_incoming() Otherwise we'll generate a memory leak of imessaging_post_state/ tevent_immediate structures per incoming message! BUG: https://bugzilla.samba.org/show_bug.cgi?id=15201 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/auth/auth_samba4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c index ff8dc94d296..6c017ef4aa3 100644 --- a/source3/auth/auth_samba4.c +++ b/source3/auth/auth_samba4.c @@ -241,12 +241,12 @@ static NTSTATUS prepare_gensec(const struct auth_context *auth_context, return NT_STATUS_INVALID_SERVER_STATE; } - msg_ctx = imessaging_init(frame, + msg_ctx = imessaging_init_discard_incoming(frame, lp_ctx, *server_id, event_ctx); if (msg_ctx == NULL) { - DEBUG(1, ("imessaging_init failed\n")); + DEBUG(1, ("imessaging_init_discard_incoming failed\n")); TALLOC_FREE(frame); return NT_STATUS_INVALID_SERVER_STATE; } @@ -324,12 +324,12 @@ static NTSTATUS make_auth4_context_s4(const struct auth_context *auth_context, return NT_STATUS_INVALID_SERVER_STATE; } - msg_ctx = imessaging_init(frame, + msg_ctx = imessaging_init_discard_incoming(frame, lp_ctx, *server_id, event_ctx); if (msg_ctx == NULL) { - DEBUG(1, ("imessaging_init failed\n")); + DEBUG(1, ("imessaging_init_discard_incoming failed\n")); TALLOC_FREE(frame); return NT_STATUS_INVALID_SERVER_STATE; } -- 2.11.4.GIT