diff options
author | Ian Moffett <ian@osmora.org> | 2024-06-28 23:51:54 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-06-28 23:51:54 -0400 |
commit | 00aa0a0eb1c197d45701e4faa321cd7e256a5bfe (patch) | |
tree | 018c421515d11f5d90e26a8b55c67a70879492e2 /sys | |
parent | 4302cf39db615ece37bb00c6d5245200165b838e (diff) |
kernel: fork: Ensure 'newproc' is zeroed
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_fork.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index ce5f3a6..421f478 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -54,6 +54,7 @@ fork1(struct proc *cur, int flags, void(*ip)(void), struct proc **newprocp) if (newproc == NULL) return -ENOMEM; + memset(newproc, 0, sizeof(*newproc)); status = md_fork(newproc, cur, (uintptr_t)ip); if (status != 0) goto done; |