From: Ralph Boehme Date: Thu, 15 Sep 2016 12:19:27 +0000 (+0200) Subject: lib/poll_funcs: free timers in poll_funcs_state_destructor() X-Git-Tag: tevent-0.9.31~349 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=5d2ca258662330f44b93bc83af208d203a115b1b lib/poll_funcs: free timers in poll_funcs_state_destructor() BUG: https://bugzilla.samba.org/show_bug.cgi?id=12272 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/lib/poll_funcs/poll_funcs_tevent.c b/lib/poll_funcs/poll_funcs_tevent.c index 3059ebc04c2..3d79b750035 100644 --- a/lib/poll_funcs/poll_funcs_tevent.c +++ b/lib/poll_funcs/poll_funcs_tevent.c @@ -474,6 +474,7 @@ struct poll_funcs *poll_funcs_init_tevent(TALLOC_CTX *mem_ctx) static int poll_funcs_state_destructor(struct poll_funcs_state *state) { size_t num_watches = talloc_array_length(state->watches); + size_t num_timeouts = talloc_array_length(state->timeouts); size_t i; /* * Make sure the watches are cleared before the contexts. The watches @@ -482,6 +483,9 @@ static int poll_funcs_state_destructor(struct poll_funcs_state *state) for (i=0; iwatches[i]); } + for (i=0; itimeouts[i]); + } return 0; }