aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-01-15 21:58:39 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-01-15 21:58:39 +0100
commit84a9d5835a8483a805e5c618e952bc08697fce5d (patch)
tree0b64b506bc8959bd4280dc3f1411fb6df5ec5c37
parent1bd7a06a958e93dbd10d99d30ee9ad82fca13f48 (diff)
downloadglibc-84a9d5835a8483a805e5c618e952bc08697fce5d.zip
glibc-84a9d5835a8483a805e5c618e952bc08697fce5d.tar.gz
glibc-84a9d5835a8483a805e5c618e952bc08697fce5d.tar.bz2
hurd: Fix exec() leak on proc_task2proc failure
env is allocated after args, so should be freed before it.
-rw-r--r--hurd/hurdexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
index 546cc69..d5a20cb 100644
--- a/hurd/hurdexec.c
+++ b/hurd/hurdexec.c
@@ -469,10 +469,10 @@ retry:
/* Got a signal while inside an RPC of the critical section, retry again */
goto retry;
- outargs:
- free (args);
outenv:
free (env);
+ outargs:
+ free (args);
return err;
}
libc_hidden_def (_hurd_exec_paths)