Mercurial > vim
comparison src/channel.c @ 11690:ce434212d682 v8.0.0728
patch 8.0.0728: the terminal structure is never freed
commit https://github.com/vim/vim/commit/96ca27a0ee8ae738cab9fb386984c75c6821e31a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 17 23:20:24 2017 +0200
patch 8.0.0728: the terminal structure is never freed
Problem: The terminal structure is never freed.
Solution: Free the structure and unreference what it contains.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 17 Jul 2017 23:30:03 +0200 |
parents | 3c6cc2f24645 |
children | 13ecb3e64399 |
comparison
equal
deleted
inserted
replaced
11689:d0213284cfb4 | 11690:ce434212d682 |
---|---|
4891 redraw_after_callback(); | 4891 redraw_after_callback(); |
4892 } | 4892 } |
4893 } | 4893 } |
4894 | 4894 |
4895 /* | 4895 /* |
4896 * "job_start()" function | 4896 * Create a job and return it. Implements job_start(). |
4897 * The returned job has a refcount of one. | |
4898 * Returns NULL when out of memory. | |
4897 */ | 4899 */ |
4898 job_T * | 4900 job_T * |
4899 job_start(typval_T *argvars, jobopt_T *opt_arg) | 4901 job_start(typval_T *argvars, jobopt_T *opt_arg) |
4900 { | 4902 { |
4901 job_T *job; | 4903 job_T *job; |
5147 dict_add_nr_str(dict, "exitval", job->jv_exitval, NULL); | 5149 dict_add_nr_str(dict, "exitval", job->jv_exitval, NULL); |
5148 dict_add_nr_str(dict, "exit_cb", 0L, job->jv_exit_cb); | 5150 dict_add_nr_str(dict, "exit_cb", 0L, job->jv_exit_cb); |
5149 dict_add_nr_str(dict, "stoponexit", 0L, job->jv_stoponexit); | 5151 dict_add_nr_str(dict, "stoponexit", 0L, job->jv_stoponexit); |
5150 } | 5152 } |
5151 | 5153 |
5154 /* | |
5155 * Send a signal to "job". Implements job_stop(). | |
5156 * When "type" is not NULL use this for the type. | |
5157 * Otherwise use argvars[1] for the type. | |
5158 */ | |
5152 int | 5159 int |
5153 job_stop(job_T *job, typval_T *argvars) | 5160 job_stop(job_T *job, typval_T *argvars, char *type) |
5154 { | 5161 { |
5155 char_u *arg; | 5162 char_u *arg; |
5156 | 5163 |
5157 if (argvars[1].v_type == VAR_UNKNOWN) | 5164 if (type != NULL) |
5165 arg = (char_u *)type; | |
5166 else if (argvars[1].v_type == VAR_UNKNOWN) | |
5158 arg = (char_u *)""; | 5167 arg = (char_u *)""; |
5159 else | 5168 else |
5160 { | 5169 { |
5161 arg = get_tv_string_chk(&argvars[1]); | 5170 arg = get_tv_string_chk(&argvars[1]); |
5162 if (arg == NULL) | 5171 if (arg == NULL) |