tevent: add a note to tevent_add_fd()
authorStefan Metzmacher <metze@samba.org>
Mon, 18 May 2015 11:25:33 +0000 (13:25 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 20 May 2015 17:29:30 +0000 (19:29 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11141

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/tevent.h

index c54cbe2133649df5830ea0fd61f766fafd7d64d4..6861ffbbfd4c1ab8c4b15947f736b8d68c6a684f 100644 (file)
@@ -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,