fix potential os crash on filesystem shutdown due to handle leak in FSNodeTraverseLayer

This commit is contained in:
Doctor5555 2022-01-19 22:28:16 +00:00
parent 099d6af4a8
commit 3a9bf51a4a
1 changed files with 1 additions and 0 deletions
kernel

View File

@ -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;
}