aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-26 22:47:05 -0400
committerIan Moffett <ian@osmora.org>2024-04-26 22:47:05 -0400
commitfe4465124d1d9486910440641e1df287a0d3f56f (patch)
treeb9f80333175783184359086d393c0ba813221e71 /sys/kern
parent1a6fdb46a9b146573ce517bbf63b4c0e0fb35357 (diff)
kernel: kern_exec: Close file descriptor
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index b5b4cd2..1c91025 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -205,6 +205,7 @@ execv(char *pathname, char **argv, uintptr_t *sp_res)
set_frame_ip(td->tf, args.auxv.at_entry);
done:
/* We are done, free argp and release the thread */
+ fd_close_fdnum(td, fd);
spinlock_release(&td->lock);
dynfree(args.argp);
return ret;