1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r1517: change event_remove_timed() to remove by structure not by handler.

this fixes a crash bug in smbd with multiple RPC clients
(This used to be commit 6e102f732e4404fc5f9b2851d12b00d2d083b43d)
This commit is contained in:
Andrew Tridgell 2004-07-15 10:07:05 +00:00 committed by Gerald (Jerry) Carter
parent 7a0e61f38e
commit eeec610983

View File

@ -186,15 +186,13 @@ struct timed_event *event_add_timed(struct event_context *ev, struct timed_event
/*
remove a timed event
the event to remove is matched only on the handler function
return False on failure (event not found)
*/
BOOL event_remove_timed(struct event_context *ev, struct timed_event *e1)
{
struct timed_event *e;
for (e=ev->timed_events; e; e=e->next) {
if (e->ref_count &&
e->handler == e1->handler) {
if (e->ref_count && e == e1) {
e->ref_count--;
return True;
}