diff src/buffer.c @ 9087:d4606ae170aa v7.4.1828

commit https://github.com/vim/vim/commit/e0f76d00979c972329f6c371463a20da61ccad65 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 9 20:38:53 2016 +0200 patch 7.4.1828 Problem: May try to access buffer that's already freed. Solution: When freeing a buffer remove it from any channel.
author Christian Brabandt <cb@256bit.org>
date Mon, 09 May 2016 20:45:08 +0200
parents 24b43dd167eb
children 97a9538c37ff
line wrap: on
line diff
--- 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)