diff options
-rw-r--r-- | source4/lib/messaging/messaging.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index f8f998f5cf..c02a79ab8d 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -364,12 +364,12 @@ void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void } /* the list base possibly changed */ - if (list == NULL) { - if (msg_type >= msg->num_types) { + if (msg_type >= msg->num_types) { + if (list == NULL) { idr_remove(msg->dispatch_tree, msg_type); - } else { - msg->dispatch[msg_type] = NULL; } + } else { + msg->dispatch[msg_type] = list; } } |