From 0cf62a92f26ef9c7d3c5a5d256adc72d66335319 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 31 Jan 2013 16:31:45 +0100 Subject: tevent_poll: NULL out fde->event_ctx for "fresh" poll fdes This is done in tevent_common_context_destructor for the non-fresh fdes already Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- lib/tevent/tevent_poll.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/tevent') diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c index f64dd386f9..0c580e49ee 100644 --- a/lib/tevent/tevent_poll.c +++ b/lib/tevent/tevent_poll.c @@ -57,6 +57,14 @@ struct poll_event_context { static int poll_event_context_destructor(struct poll_event_context *poll_ev) { + struct tevent_fd *fd, *fn; + + for (fd = poll_ev->fresh; fd; fd = fn) { + fn = fd->next; + fd->event_ctx = NULL; + DLIST_REMOVE(poll_ev->fresh, fd); + } + if (poll_ev->signal_fd == -1) { /* * Non-threaded, no signal pipe -- cgit