lib: tevent: Fix bug in poll backend - poll_event_loop_poll()
authorJeremy Allison <jra@samba.org>
Tue, 17 Nov 2015 18:28:50 +0000 (10:28 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 18 Apr 2016 10:59:26 +0000 (12:59 +0200)
commit1ca26eae75780a789559158ecec1afaa93f5dff4
tree521e2d44d36569d1741b98ea9158d4123f3d51cb
parent316ce07af065996c1c74344556e984e8018b9af3
lib: tevent: Fix bug in poll backend - poll_event_loop_poll()

If the (pfd->revents & POLLNVAL) case is triggered,
we do DLIST_REMOVE(ev->fd_events, fde); and then
use fde->next in the loop above.

Save off fde->next for loop interation before
this so we can't use a deleted ->next value.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11771

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2be3dd1407eabe3df360ede2eab178848e34733c)
lib/tevent/tevent_poll.c