1
0
forked from aniani/vim

patch 8.2.0435: channel contents might be freed twice

Problem:    Channel contents might be freed twice.
Solution:   Call either channel_free_channel() or channel_free(), not both.
            (Nobuhiro Takasaki, closes #5835)
This commit is contained in:
Bram Moolenaar
2020-03-23 22:01:17 +01:00
parent a8bd349638
commit dbbb0ef729
2 changed files with 5 additions and 1 deletions

View File

@@ -4457,9 +4457,11 @@ channel_parse_messages(void)
if (channel->ch_killing) if (channel->ch_killing)
{ {
channel_free_contents(channel); channel_free_contents(channel);
channel_free_channel(channel);
channel->ch_job->jv_channel = NULL; channel->ch_job->jv_channel = NULL;
} }
channel_free(channel); else
channel_free(channel);
// channel has been freed, start over // channel has been freed, start over
channel = first_channel; channel = first_channel;
continue; continue;

View File

@@ -738,6 +738,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 */
/**/
435,
/**/ /**/
434, 434,
/**/ /**/