patch 7.4.1814
Problem:    A channel may be garbage collected while it's still being used by
            a job. (James McCoy)
Solution:   Mark the channel as used if the job is still used.  Do the same
            for channels that are still used.
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index d14337d..5e0bec5 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -49,6 +49,7 @@
 void free_job_options(jobopt_T *opt);
 int get_job_options(typval_T *tv, jobopt_T *opt, int supported);
 channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, int part);
+int set_ref_in_job(int copyID);
 void job_unref(job_T *job);
 int free_unused_jobs_contents(int copyID, int mask);
 void free_unused_jobs(int copyID, int mask);