diff options
author | Szabolcs Nagy <nsz@port70.net> | 2013-10-07 13:24:00 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013-10-07 13:24:00 +0000 |
commit | c3a43b35cc52a7fac93a8c1030d94c919c3ab0eb (patch) | |
tree | 028ac857e1d19b349029ebacb3d947ee00840c0d | |
parent | 49b3a0d2cedd3693d77924fdc0a7719a75bd28da (diff) | |
download | musl-c3a43b35cc52a7fac93a8c1030d94c919c3ab0eb.tar.gz musl-c3a43b35cc52a7fac93a8c1030d94c919c3ab0eb.tar.bz2 musl-c3a43b35cc52a7fac93a8c1030d94c919c3ab0eb.tar.xz musl-c3a43b35cc52a7fac93a8c1030d94c919c3ab0eb.zip |
add missing va_end in execl* for correcness and static code analyzers
-rw-r--r-- | src/process/execl.c | 1 | ||||
-rw-r--r-- | src/process/execle.c | 1 | ||||
-rw-r--r-- | src/process/execlp.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/process/execl.c b/src/process/execl.c index 327d78b2..5ee5c81e 100644 --- a/src/process/execl.c +++ b/src/process/execl.c @@ -16,6 +16,7 @@ int execl(const char *path, const char *argv0, ...) for (i=1; i<argc; i++) argv[i] = va_arg(ap, char *); argv[i] = NULL; + va_end(ap); return execv(path, argv); } } diff --git a/src/process/execle.c b/src/process/execle.c index 6f2ec055..37ca5034 100644 --- a/src/process/execle.c +++ b/src/process/execle.c @@ -17,6 +17,7 @@ int execle(const char *path, const char *argv0, ...) for (i=1; i<=argc; i++) argv[i] = va_arg(ap, char *); envp = va_arg(ap, char **); + va_end(ap); return execve(path, argv, envp); } } diff --git a/src/process/execlp.c b/src/process/execlp.c index c7b3f513..5eed886e 100644 --- a/src/process/execlp.c +++ b/src/process/execlp.c @@ -16,6 +16,7 @@ int execlp(const char *file, const char *argv0, ...) for (i=1; i<argc; i++) argv[i] = va_arg(ap, char *); argv[i] = NULL; + va_end(ap); return execvp(file, argv); } } |