From ad9066c272093fc16c55f142e844959cdba25804 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 13 Oct 2015 02:59:03 +0200 Subject: fix use of va_copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/unistd/exec.c | 1 + src/unistd/execat.c | 1 + src/unistd/fexec.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/unistd/exec.c b/src/unistd/exec.c index 1408cbf..70b54f6 100644 --- a/src/unistd/exec.c +++ b/src/unistd/exec.c @@ -60,6 +60,7 @@ static void vexec(const char* file, va_list argv, int fetch_envp, int use_path) for (i = 0; i < n; i++) argv_[i] = va_arg(argv, char*); + va_end(args); (void)(use_path ? execvpe : execve)(file, argv_, envp); } diff --git a/src/unistd/execat.c b/src/unistd/execat.c index e244812..a90fffb 100644 --- a/src/unistd/execat.c +++ b/src/unistd/execat.c @@ -66,6 +66,7 @@ static void vexecat(int dirfd, const char* file, va_list argv, int fetch_envp, i for (i = 0; i < n; i++) argv_[i] = va_arg(argv, char*); + va_end(args); (void)(use_path ? execvpeat : execveat)(dirfd, file, argv_, envp, flags); } diff --git a/src/unistd/fexec.c b/src/unistd/fexec.c index bc88c57..bf2c392 100644 --- a/src/unistd/fexec.c +++ b/src/unistd/fexec.c @@ -58,6 +58,7 @@ static void vexec(int fd, va_list argv, int fetch_envp) for (i = 0; i < n; i++) argv_[i] = va_arg(argv, char*); + va_end(args); fexecve(fd, argv_, envp); } -- cgit v1.2.3-70-g09d2