diff options
author | Volker Lendecke <vl@samba.org> | 2013-01-31 16:31:45 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-02-02 19:52:57 -0800 |
commit | 0cf62a92f26ef9c7d3c5a5d256adc72d66335319 (patch) | |
tree | 71dce752b1b884a95a60c1b7ee0e4ea2c520074a | |
parent | 3ce58cbcf3d9653ee6b0002f52a29ab922beab4e (diff) | |
download | samba-0cf62a92f26ef9c7d3c5a5d256adc72d66335319.tar.gz samba-0cf62a92f26ef9c7d3c5a5d256adc72d66335319.tar.bz2 samba-0cf62a92f26ef9c7d3c5a5d256adc72d66335319.zip |
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 <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | lib/tevent/tevent_poll.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 |