From 33ca0179ac091c8bb1c2b3fa7999cc5047d09a80 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 18 May 2015 13:25:33 +0200 Subject: [PATCH] tevent: add a note to tevent_add_fd() BUG: https://bugzilla.samba.org/show_bug.cgi?id=11141 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- lib/tevent/tevent.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h index c54cbe21336..6861ffbbfd4 100644 --- a/lib/tevent/tevent.h +++ b/lib/tevent/tevent.h @@ -176,6 +176,11 @@ void tevent_set_default_backend(const char *backend); * * @note To cancel the monitoring of a file descriptor, call talloc_free() * on the object returned by this function. + * + * @note The caller should avoid closing the file descriptor before + * calling talloc_free()! Otherwise the behaviour is undefined which + * might result in crashes. See https://bugzilla.samba.org/show_bug.cgi?id=11141 + * for an example. */ struct tevent_fd *tevent_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx, -- 2.47.3