Skip to content

Commit 5fd8b78

Browse files
committed
patch 8.0.1286: occasional crash when using a channel
Problem: Occasional crash when using a channel. (Marek) Solution: Decrement reference count later. (closes #2315)
1 parent d09a206 commit 5fd8b78

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/channel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2898,8 +2898,6 @@ channel_close(channel_T *channel, int invoke_close_cb)
28982898
channel->ch_close_cb = NULL;
28992899
channel->ch_close_partial = NULL;
29002900

2901-
--channel->ch_refcount;
2902-
29032901
if (channel_need_redraw)
29042902
{
29052903
channel_need_redraw = FALSE;
@@ -2910,6 +2908,8 @@ channel_close(channel_T *channel, int invoke_close_cb)
29102908
/* any remaining messages are useless now */
29112909
for (part = PART_SOCK; part < PART_IN; ++part)
29122910
drop_messages(channel, part);
2911+
2912+
--channel->ch_refcount;
29132913
}
29142914
}
29152915

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1286,
764766
/**/
765767
1285,
766768
/**/

0 commit comments

Comments
 (0)