From 3a9bf51a4a644cb3f46b17ef3e0361a754939ea6 Mon Sep 17 00:00:00 2001 From: Doctor5555 <5555thedoctor@gmail.com> Date: Wed, 19 Jan 2022 22:28:16 +0000 Subject: [PATCH] fix potential os crash on filesystem shutdown due to handle leak in FSNodeTraverseLayer --- kernel/files.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/files.cpp b/kernel/files.cpp index 3d8f6a4..ab9d31c 100644 --- a/kernel/files.cpp +++ b/kernel/files.cpp @@ -1233,6 +1233,7 @@ EsError FSNodeTraverseLayer(uintptr_t *sectionEnd, size_t nameBytes = *sectionEnd - sectionStart; if (!nameBytes) { + FSNodeCloseHandle(directory, 0); return ES_ERROR_PATH_NOT_TRAVERSABLE; }