summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-04-12 09:38:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:03 -0500
commit35cb099357028535ae8b968465edfcaa7ad1a1fd (patch)
treee6c21ba92ccaa88be1b8a2ce1aefa6e3e81e2a56
parentc8610144f73a6cbc26c58f57a527f7cbcb44b265 (diff)
downloadsamba-35cb099357028535ae8b968465edfcaa7ad1a1fd.tar.gz
samba-35cb099357028535ae8b968465edfcaa7ad1a1fd.tar.bz2
samba-35cb099357028535ae8b968465edfcaa7ad1a1fd.zip
r15050: fixed a double free in the new messaging code.
(This used to be commit ee7869bb3c901fb91efedc8208aa56df927987c5)
-rw-r--r--source4/lib/messaging/messaging.c8
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;
}
}