changeset 19758:473d7084a4a1 v8.2.0435

patch 8.2.0435: channel contents might be freed twice Commit: https://github.com/vim/vim/commit/dbbb0ef729e392e313ccc63c247bff1b828a214d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 23 22:01:17 2020 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 23 Mar 2020 22:15:04 +0100
parents a711416a0ff0
children 321ee36ae10c
files src/channel.c src/version.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -4457,9 +4457,11 @@ channel_parse_messages(void)
 	    if (channel->ch_killing)
 	    {
 		channel_free_contents(channel);
+		channel_free_channel(channel);
 		channel->ch_job->jv_channel = NULL;
 	    }
-	    channel_free(channel);
+	    else
+		channel_free(channel);
 	    // channel has been freed, start over
 	    channel = first_channel;
 	    continue;
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    435,
+/**/
     434,
 /**/
     433,