-
trya authored
Solution: Fix behavior of dbuffer on writes. Message passed in argument of dbuffer::write can be assigned directly to the back buffer without leaking, since the message has already the right reference count (see dist::distribute and msg_t::add_refs). Secondly, in order to prevent the message pending in the front buffer from leaking if it hasn't been closed yet (for example because the peer is not reachable anymore), move back buffer to front buffer using msg_t::move instead of swapping the buffers, thus allowing release of the message in the front buffer.
2fe9dd91