summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/messaging/messaging.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index e78ec83b4b..b0ca9cc41e 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -95,8 +95,9 @@ static char *messaging_path(TALLOC_CTX *mem_ctx, servid_t server_id)
*/
static void messaging_dispatch(struct messaging_state *msg, struct messaging_rec *rec)
{
- struct dispatch_fn *d;
- for (d=msg->dispatch;d;d=d->next) {
+ struct dispatch_fn *d, *next;
+ for (d=msg->dispatch;d;d=next) {
+ next = d->next;
if (d->msg_type == rec->header.msg_type) {
d->fn(msg, d->private, d->msg_type, rec->header.from, &rec->data);
}