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:
parent
7a0e61f38e
commit
eeec610983
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user