summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-05-28 14:16:10 +0200
committerBram Moolenaar <Bram@vim.org>2016-05-28 14:16:10 +0200
commit28ae5773422c2cf61aaf8d9d2b9fae70642d6a33 (patch)
tree28bed9f0546c864283e7c511493a5afdff22797b
parentaf6c12c27bcb553b2fb2c8a9dcfde626fb3670fe (diff)
patch 7.4.1853v7.4.1853
Problem: Crash when job and channel are in the same dict while using partials. (Luc Hermitte) Solution: Do not decrement the channel reference count too early.
-rw-r--r--src/channel.c3
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index f4dc323b6f..94681ee898 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2566,7 +2566,6 @@ channel_close(channel_T *channel, int invoke_close_cb)
clear_tv(&rettv);
channel_need_redraw = TRUE;
}
- --channel->ch_refcount;
/* the callback is only called once */
vim_free(channel->ch_close_cb);
@@ -2574,6 +2573,8 @@ channel_close(channel_T *channel, int invoke_close_cb)
partial_unref(channel->ch_close_partial);
channel->ch_close_partial = NULL;
+ --channel->ch_refcount;
+
if (channel_need_redraw)
{
channel_need_redraw = FALSE;
diff --git a/src/version.c b/src/version.c
index b50b19eb67..83221e23bd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1853,
+/**/
1852,
/**/
1851,