aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2021-01-09 23:19:53 +0100
committerMarvin Borner2021-01-09 23:19:53 +0100
commit836294b9232c7d63d26db4f87c32cf1420cd856d (patch)
tree54f1b28951c53b38dcde5866a74c082c8ef83b0f /kernel/drivers
parentf27a5f8af9fc5a16b80a7d6646e44d718b0efd7d (diff)
To be continued
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/keyboard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c
index e8690f1..ac97d36 100644
--- a/kernel/drivers/keyboard.c
+++ b/kernel/drivers/keyboard.c
@@ -28,6 +28,8 @@ 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;