From 5fd8b78214a52b561780eb5ba000b1a3f5ba1d3d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Nov 2017 15:54:00 +0100 Subject: [PATCH] patch 8.0.1286: occasional crash when using a channel Problem: Occasional crash when using a channel. (Marek) Solution: Decrement reference count later. (closes #2315) --- src/channel.c | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/channel.c b/src/channel.c index 606c66a869..8fc705058a 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2898,8 +2898,6 @@ channel_close(channel_T *channel, int invoke_close_cb) 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 invoke_close_cb) /* 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 index 8dd72301c7..4368138d19 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1286, /**/ 1285, /**/ -- 2.47.3