aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarvin Borner2021-01-09 22:29:05 +0100
committerMarvin Borner2021-01-09 22:29:05 +0100
commitf27a5f8af9fc5a16b80a7d6646e44d718b0efd7d (patch)
treea06eb447cf8452245e7c8f851b17e07e0f4dcb2c /kernel
parentdcd28d5246eec562c195fba07c7bd4ce7b69c94b (diff)
Finding memory leaks is SO exhausting argh
Diffstat (limited to 'kernel')
-rw-r--r--kernel/drivers/keyboard.c2
-rw-r--r--kernel/features/proc.c2
-rw-r--r--kernel/main.c1
3 files changed, 1 insertions, 4 deletions
diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c
index ac97d36..e8690f1 100644
--- a/kernel/drivers/keyboard.c
+++ b/kernel/drivers/keyboard.c
@@ -28,8 +28,6 @@ void keyboard_handler()
// TODO: "Merge" scancode to linux keycode?
/* printf("%x %x = %x\n", scancode, state ? 0xe0 : 0, merged); */
- if (event)
- free(event);
event = malloc(sizeof(*event));
event->magic = KEYBOARD_MAGIC;
event->press = (scancode & 0x80) == 0;
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index c0216bc..76da36d 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -90,7 +90,7 @@ void proc_send(struct proc *src, struct proc *dest, u32 type, void *data)
struct proc_message *msg = malloc(sizeof(*msg));
msg->src = src;
msg->dest = dest;
- msg->msg = malloc(sizeof(struct message));
+ msg->msg = malloc(sizeof(*msg->msg));
msg->msg->src = (int)src->pid;
msg->msg->type = (int)type;
msg->msg->data = data;
diff --git a/kernel/main.c b/kernel/main.c
index 665d474..563cae7 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -11,7 +11,6 @@
#include <mouse.h>
#include <net.h>
#include <pci.h>
-#include <print.h>
#include <serial.h>
#include <syscall.h>
#include <timer.h>