aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/channel.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2019-06-02 14:36:17 -0400
committerJames McCoy <jamessan@jamessan.com>2019-12-11 22:04:29 -0500
commit6dc10057876d1bf75c5cf1ea45cb4312160f13f0 (patch)
tree550e298a5ae6eabf4ba300f33ebc835b1d5a6439 /src/nvim/channel.c
parent19b6237087ebcf45427ceb6943d23ce33b39567f (diff)
downloadrneovim-6dc10057876d1bf75c5cf1ea45cb4312160f13f0.tar.gz
rneovim-6dc10057876d1bf75c5cf1ea45cb4312160f13f0.tar.bz2
rneovim-6dc10057876d1bf75c5cf1ea45cb4312160f13f0.zip
Add os_getfullenv_size/os_copyfullenv
Diffstat (limited to 'src/nvim/channel.c')
-rw-r--r--src/nvim/channel.c13
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);