Skip to content

Commit

Permalink
kthd: fix typo in memory allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 30, 2024
1 parent 28e1a2a commit d06b3b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kthd/src/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void kthdExec(ExecCommand *cmd) {
// now read the file into memory
// allocate a new buffer for this
size_t size = st.st_size + sizeof(ExecCommand);
ExecCommand *res = calloc(2, size);
ExecCommand *res = calloc(1, size);
if(!res) {
close(fd);
cmd->header.header.status = -ENOMEM;
Expand Down

0 comments on commit d06b3b2

Please sign in to comment.