mirror of
https://github.com/neovim/neovim.git
synced 2026-04-29 18:54:18 +00:00
Problem: Closing socket with pending writes leaks memory.
Analysis: When calling rstream_may_close() on an RStream with pending
writes, it waits for write_cb() to call stream_close_handle(),
which closes it as if it's a WStream and doesn't free the
RStream's buffer.
Solution: Ensure that an RStream's buffer is freed when it's closed.