[PATCH] lib/tevent: close pipe_fds on event_context destruction

Rusty Russell rusty at rustcorp.com.au
Thu Aug 27 20:41:23 MDT 2009


The "hack_fds" were never closed before; now they're inside event_context
they should be closed when that is destroyed.

Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
 lib/tevent/tevent.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 0c02e46..56d0da3 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -148,6 +148,8 @@ int tevent_common_context_destructor(struct tevent_context *ev)
 
 	if (ev->pipe_fde) {
 		talloc_free(ev->pipe_fde);
+		close(ev->pipe_fds[0]);
+		close(ev->pipe_fds[1]);
 		ev->pipe_fde = NULL;
 	}
 
-- 
1.6.0.4



More information about the samba-technical mailing list