]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1853 v7.4.1853
authorBram Moolenaar <Bram@vim.org>
Sat, 28 May 2016 12:16:10 +0000 (14:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 28 May 2016 12:16:10 +0000 (14:16 +0200)
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.

src/channel.c
src/version.c

index f4dc323b6f428b96019c4875b2b53e89233f2685..94681ee89809e9ddab177274f3d698875e5bf39c 100644 (file)
@@ -2566,7 +2566,6 @@ channel_close(channel_T *channel, int invoke_close_cb)
              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 invoke_close_cb)
          partial_unref(channel->ch_close_partial);
          channel->ch_close_partial = NULL;
 
+         --channel->ch_refcount;
+
          if (channel_need_redraw)
          {
              channel_need_redraw = FALSE;
index b50b19eb67402a0bd17b69f41c4bbb683a8be7fc..83221e23bd55c05fd8cd2154e595816d55517967 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1853,
 /**/
     1852,
 /**/