Ensure the outbound buffer is not freed on write completion

- Fixes #919