summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-05-09 20:38:53 +0200
committerBram Moolenaar <Bram@vim.org>2016-05-09 20:38:53 +0200
commite0f76d00979c972329f6c371463a20da61ccad65 (patch)
treee28e61d582639de36a5885f47333ae7d63a90dc1 /src/buffer.c
parentfb6ffc732e65dbc459c89247ff78134402f1a18b (diff)
downloadvim-git-e0f76d00979c972329f6c371463a20da61ccad65.tar.gz
patch 7.4.1828v7.4.1828
Problem: May try to access buffer that's already freed. Solution: When freeing a buffer remove it from any channel.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 9bc24bc12..e884f55dd 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -676,6 +676,9 @@ free_buffer(buf_T *buf)
#ifdef FEAT_RUBY
ruby_buffer_free(buf);
#endif
+#ifdef FEAT_JOB_CHANNEL
+ channel_buffer_free(buf);
+#endif
#ifdef FEAT_AUTOCMD
aubuflocal_remove(buf);
if (autocmd_busy)