libevent/libevent — pull request #77 by flandr (2013-09-03 21:59:17+00:00)
Title: Avoid racy bufferevent activation

The evhttp_send_reply method invokes evhttp_write_buffer with a
callback that may release the underlying request object and
bufferevent upon completion. This cleanup callback is invoked by the
underlying bufferevent's write callback. Improperly enabling write
events before referencing the bufferevent could lead to use after free
and memory corruption.