summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-09-19 11:42:05 -0700
committerKarolin Seeger <kseeger@samba.org>2016-09-20 10:10:18 +0200
commit5eeeeff10b7d1054d9e955f09ca504cd2b6e6be4 (patch)
tree92379a5504601c20c271e9a61f8ca20f2eaf2219
parent5992c18963f3ed677fa5b92cb7322107e9990344 (diff)
downloadsamba-5eeeeff10b7d1054d9e955f09ca504cd2b6e6be4.tar.gz
lib/poll_funcs: free contexts in poll_funcs_state_destructor()
This ensures the destructors get called in the proper order. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12272 Back-port from c132b78c484c14d255a98567e90b934b73ebf8c2 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/lib/poll_funcs/poll_funcs_tevent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/poll_funcs/poll_funcs_tevent.c b/source3/lib/poll_funcs/poll_funcs_tevent.c
index 565cdaf1cfc..aba989d8df5 100644
--- a/source3/lib/poll_funcs/poll_funcs_tevent.c
+++ b/source3/lib/poll_funcs/poll_funcs_tevent.c
@@ -302,6 +302,9 @@ static int poll_funcs_state_destructor(struct poll_funcs_state *state)
for (i=0; i<state->num_watches; i++) {
TALLOC_FREE(state->watches[i]);
}
+ for (i=0; i<state->num_contexts; i++) {
+ TALLOC_FREE(state->contexts[i]);
+ }
return 0;
}