From 13cfe36b6188df8cfd88f10850a5866af19b0e71 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 17 Sep 2024 08:29:42 +0200 Subject: [PATCH] s4:lib/messaging: fix interaction between imessaging_reinit and irpc_destructor This was missing in commit 0d096931196524a2d1bf59470bc629dc9231131e. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15280 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Wed Sep 18 19:45:56 UTC 2024 on atb-devel-224 (cherry picked from commit a14320461e3abb56f5dacc90ca73bc1143270394) Autobuild-User(v4-19-test): Jule Anger Autobuild-Date(v4-19-test): Wed Oct 2 15:37:43 UTC 2024 on atb-devel-224 --- source4/lib/messaging/messaging.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 7f5dab61b49..907fa4f9f72 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -443,6 +443,15 @@ void imessaging_dgm_unref_ev(struct tevent_context *ev) static NTSTATUS imessaging_reinit(struct imessaging_context *msg) { int ret = -1; + struct irpc_request *irpc = NULL; + struct irpc_request *next = NULL; + + for (irpc = msg->requests; irpc != NULL; irpc = next) { + next = irpc->next; + + DLIST_REMOVE(msg->requests, irpc); + irpc->callid = -1; + } TALLOC_FREE(msg->msg_dgm_ref); -- 2.47.2