diff src/eval.c @ 8318:190d8084cb3a v7.4.1451

commit https://github.com/vim/vim/commit/707659490d35e8d66e8bbdcfd93b12dc1387d86c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 28 19:28:59 2016 +0100 patch 7.4.1451 Problem: Vim hangs when a channel has a callback but isn't referenced. Solution: Have channel_unref() only return TRUE when the channel was actually freed.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Feb 2016 19:30:04 +0100
parents 4e057409f1d7
children 3e54b31d50c7
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -7747,10 +7747,7 @@ failret:
 channel_unref(channel_T *channel)
 {
     if (channel != NULL && --channel->ch_refcount <= 0)
-    {
-	channel_may_free(channel);
-	return TRUE;
-    }
+	return channel_may_free(channel);
     return FALSE;
 }
 #endif