summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-29 00:13:01 -0400
committerIan Moffett <ian@osmora.org>2024-06-29 00:13:01 -0400
commit02e4278156d4f70604f8464947cfce3d57f4c551 (patch)
treeb13bf7bded1843e337bdd7245f032867a17dae08 /sys/kern
parentcb79be6891edb267383328557d1a46e86181075d (diff)
kernel: elf: Fix memory leak
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/exec_elf64.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/exec_elf64.c b/sys/kern/exec_elf64.c
index 8367ae5..4f441b2 100644
--- a/sys/kern/exec_elf64.c
+++ b/sys/kern/exec_elf64.c
@@ -232,6 +232,7 @@ elf64_load(const char *pathname, struct proc *td, struct exec_prog *prog)
/* Did program header loading fail? */
if (error != 0) {
elf_unload(td, prog);
+ dynfree(file.data);
return error;
}