mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
Add os_getfullenv_size/os_copyfullenv
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user