diff options
Diffstat (limited to 'src/nvim/channel.c')
-rw-r--r-- | src/nvim/channel.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/nvim/channel.c b/src/nvim/channel.c index f8b480adcb..2bb568f025 100644 --- a/src/nvim/channel.c +++ b/src/nvim/channel.c @@ -272,15 +272,6 @@ static void close_cb(Stream *stream, void *data) channel_decref(data); } -static inline void free_env(char **env) -{ - if (!env) { return; } - for (char **it = env; *it; it++) { - XFREE_CLEAR(*it); - } - xfree(env); -} - /// Starts a job and returns the associated channel /// @@ -362,7 +353,7 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, if (status) { EMSG3(_(e_jobspawn), os_strerror(status), cmd); xfree(cmd); - free_env(proc->env); + os_free_fullenv(proc->env); if (proc->type == kProcessTypePty) { xfree(chan->stream.pty.term_name); } @@ -371,7 +362,7 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, return NULL; } xfree(cmd); - free_env(proc->env); + os_free_fullenv(proc->env); wstream_init(&proc->in, 0); |