From 35cb099357028535ae8b968465edfcaa7ad1a1fd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 12 Apr 2006 09:38:07 +0000 Subject: r15050: fixed a double free in the new messaging code. (This used to be commit ee7869bb3c901fb91efedc8208aa56df927987c5) --- source4/lib/messaging/messaging.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/messaging') 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; } } -- cgit