changeset 9139:ddca37101ffb v7.4.1853

commit https://github.com/vim/vim/commit/28ae5773422c2cf61aaf8d9d2b9fae70642d6a33 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 28 14:16:10 2016 +0200 patch 7.4.1853 Problem: Crash when job and channel are in the same dict while using partials. (Luc Hermitte) Solution: Do not decrement the channel reference count too early.
author Christian Brabandt <cb@256bit.org>
date Sat, 28 May 2016 14:30:05 +0200
parents 9beab1ecf2eb
children 443e416797f4
files src/channel.c src/version.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -2566,7 +2566,6 @@ channel_close(channel_T *channel, int in
 	      clear_tv(&rettv);
 	      channel_need_redraw = TRUE;
 	  }
-	  --channel->ch_refcount;
 
 	  /* the callback is only called once */
 	  vim_free(channel->ch_close_cb);
@@ -2574,6 +2573,8 @@ channel_close(channel_T *channel, int in
 	  partial_unref(channel->ch_close_partial);
 	  channel->ch_close_partial = NULL;
 
+	  --channel->ch_refcount;
+
 	  if (channel_need_redraw)
 	  {
 	      channel_need_redraw = FALSE;
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1853,
+/**/
     1852,
 /**/
     1851,