# HG changeset patch # User Christian Brabandt # Date 1510412406 -3600 # Node ID 60e1e4cfb21e1e0a924dbb4f94a7c726952b2735 # Parent 5cf3f5d55dcaa62df52a1e29f9e9099f14877f76 patch 8.0.1286: occasional crash when using a channel commit https://github.com/vim/vim/commit/5fd8b78214a52b561780eb5ba000b1a3f5ba1d3d Author: Bram Moolenaar Date: Sat Nov 11 15:54:00 2017 +0100 patch 8.0.1286: occasional crash when using a channel Problem: Occasional crash when using a channel. (Marek) Solution: Decrement reference count later. (closes https://github.com/vim/vim/issues/2315) diff --git a/src/channel.c b/src/channel.c --- a/src/channel.c +++ b/src/channel.c @@ -2898,8 +2898,6 @@ channel_close(channel_T *channel, int in channel->ch_close_cb = NULL; channel->ch_close_partial = NULL; - --channel->ch_refcount; - if (channel_need_redraw) { channel_need_redraw = FALSE; @@ -2910,6 +2908,8 @@ channel_close(channel_T *channel, int in /* any remaining messages are useless now */ for (part = PART_SOCK; part < PART_IN; ++part) drop_messages(channel, part); + + --channel->ch_refcount; } } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1286, +/**/ 1285, /**/ 1284,