]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:lib/messaging: fix interaction between imessaging_reinit and irpc_destructor
authorStefan Metzmacher <metze@samba.org>
Tue, 17 Sep 2024 06:29:42 +0000 (08:29 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 18 Sep 2024 19:45:56 +0000 (19:45 +0000)
This was missing in commit 0d096931196524a2d1bf59470bc629dc9231131e.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15280

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Sep 18 19:45:56 UTC 2024 on atb-devel-224

source4/lib/messaging/messaging.c

index 8d76f17367a03375d41dad041ec064a1e9937032..aa923165255c38602cc896c1f919a669d7dacfd3 100644 (file)
@@ -440,6 +440,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);