mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
support: Fix memory leaks in support_subprogram, support_subprogram_wait
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@@ -89,6 +89,7 @@ support_subprogram (const char *file, char *const argv[], char *const envp[])
|
||||
|
||||
result.pid = xposix_spawn (file, &fa, NULL, argv,
|
||||
envp == NULL ? environ : envp);
|
||||
posix_spawn_file_actions_destroy (&fa);
|
||||
|
||||
xclose (result.stdout_pipe[1]);
|
||||
xclose (result.stderr_pipe[1]);
|
||||
@@ -105,6 +106,7 @@ support_subprogram_wait (const char *file, char *const argv[])
|
||||
struct support_subprocess res = support_subprocess_init ();
|
||||
|
||||
res.pid = xposix_spawn (file, &fa, NULL, argv, environ);
|
||||
posix_spawn_file_actions_destroy (&fa);
|
||||
|
||||
return support_process_wait (&res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user