* [hurd,commited] hurd: Fix exec() leak on proc_task2proc failure
@ 2022-01-15 20:59 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2022-01-15 20:59 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
env is allocated after args, so should be freed before it.
---
hurd/hurdexec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
index 546cc69960..d5a20cb9b0 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)
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-15 20:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-15 20:59 [hurd,commited] hurd: Fix exec() leak on proc_task2proc failure Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).