diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-04-12 09:38:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:04:03 -0500 |
commit | 35cb099357028535ae8b968465edfcaa7ad1a1fd (patch) | |
tree | e6c21ba92ccaa88be1b8a2ce1aefa6e3e81e2a56 /source4/lib | |
parent | c8610144f73a6cbc26c58f57a527f7cbcb44b265 (diff) | |
download | samba-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)
Diffstat (limited to 'source4/lib')
-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; } } |