From 1ee428d5cad6910521ce77322614183fa2c7916e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 11 Feb 2013 10:53:15 -0800 Subject: tevent: Add in the same tevent_re_initialise() fix Metze put in the tevent_poll backend. We might be called during tevent_re_initialise() which means we need to free our old additional_data. Signed-off-by: Jeremy Allison Reviewed-by: Stefan Metzmacher --- lib/tevent/tevent_epoll.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/tevent/tevent_epoll.c') diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c index 5a17331da6c..8696215f49f 100644 --- a/lib/tevent/tevent_epoll.c +++ b/lib/tevent/tevent_epoll.c @@ -389,6 +389,12 @@ static int epoll_event_context_init(struct tevent_context *ev) int ret; struct epoll_event_context *epoll_ev; + /* + * We might be called during tevent_re_initialise() + * which means we need to free our old additional_data. + */ + TALLOC_FREE(ev->additional_data); + epoll_ev = talloc_zero(ev, struct epoll_event_context); if (!epoll_ev) return -1; epoll_ev->ev = ev; -- cgit