Fixup the clean-up of environment handling.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2007-12-07 22:45:20 +01:00
parent 864e1c96c2
commit d63abd8dc5
3 changed files with 3 additions and 3 deletions

View File

@@ -728,7 +728,7 @@ char **copy_environ()
return env;
}
void free_env(char **env)
void free_environ(char **env)
{
int i;
for (i = 0; env[i]; i++)

View File

@@ -637,7 +637,7 @@ sig_handler_t mingw_signal(int sig, sig_handler_t handler);
*/
char **copy_environ(void);
void free_environ(void);
void free_environ(char **env);
char **env_setenv(char **env, const char *name);
#endif /* __MINGW32__ */

View File

@@ -159,7 +159,7 @@ int start_command(struct child_process *cmd)
cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env);
if (cmd->env)
free(env);
free_environ(env);
if (cmd->git_cmd)
strbuf_release(&git_cmd);