From: Samuel Thibault Date: Sat, 15 Jan 2022 20:58:39 +0000 (+0100) Subject: hurd: Fix exec() leak on proc_task2proc failure X-Git-Tag: glibc-2.35~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84a9d5835a8483a805e5c618e952bc08697fce5d;p=thirdparty%2Fglibc.git hurd: Fix exec() leak on proc_task2proc failure env is allocated after args, so should be freed before it. --- diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c index 546cc69960f..d5a20cb9b09 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)