1
0
forked from aniani/vim

patch 7.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.
This commit is contained in:
Bram Moolenaar
2016-05-28 14:16:10 +02:00
parent af6c12c27b
commit 28ae577342
2 changed files with 4 additions and 1 deletions

View File

@@ -2566,7 +2566,6 @@ channel_close(channel_T *channel, int invoke_close_cb)
clear_tv(&rettv); clear_tv(&rettv);
channel_need_redraw = TRUE; channel_need_redraw = TRUE;
} }
--channel->ch_refcount;
/* the callback is only called once */ /* the callback is only called once */
vim_free(channel->ch_close_cb); 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); partial_unref(channel->ch_close_partial);
channel->ch_close_partial = NULL; channel->ch_close_partial = NULL;
--channel->ch_refcount;
if (channel_need_redraw) if (channel_need_redraw)
{ {
channel_need_redraw = FALSE; channel_need_redraw = FALSE;

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1853,
/**/ /**/
1852, 1852,
/**/ /**/