summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-09 18:16:43 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-09 18:16:43 +0200
commit5b5adf5b9cd226d775643872e65c62674d6ada95 (patch)
tree4b06972c0929cd46fd955b5a25e872727ffe450d /src/channel.c
parent9d18961323a2a5c3b609c98ce0d78613c71f3532 (diff)
patch 8.0.1083: leaking memory in input part of channelv8.0.1083
Problem: Leaking memory in input part of channel. Solution: Clear the input part of channel. Free the entry. Move failing command test to a separate file to avoid bogus leak reports clouding tests that should not leak.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index 0e9a58007e..fa1898db9c 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2939,6 +2939,7 @@ remove_from_writeque(writeq_T *wq, writeq_T *entry)
wq->wq_prev = NULL;
else
wq->wq_next->wq_prev = NULL;
+ vim_free(entry);
}
/*
@@ -2990,7 +2991,7 @@ channel_clear(channel_T *channel)
channel_clear_one(channel, PART_SOCK);
channel_clear_one(channel, PART_OUT);
channel_clear_one(channel, PART_ERR);
- /* there is no callback or queue for PART_IN */
+ channel_clear_one(channel, PART_IN);
free_callback(channel->ch_callback, channel->ch_partial);
channel->ch_callback = NULL;
channel->ch_partial = NULL;