diff --git a/src/bin/consoled/consoled.cpp b/src/bin/consoled/consoled.cpp index dc577fe7f6..3a1497fed9 100644 --- a/src/bin/consoled/consoled.cpp +++ b/src/bin/consoled/consoled.cpp @@ -262,6 +262,8 @@ open_keyboards(int target, const char* start, struct keyboard* previous) B_URGENT_DISPLAY_PRIORITY, keyboard); if (keyboard->thread < 0) { close(fd); + closedir(dir); + delete keyboard; return NULL; }