kernel: release descriptors when rejecting read-only truncation (#504)

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Mininautandnmzik authored and GitHub committed 2026-09-12 17:44:45 +04:00
1 parent a21ffde34e
commit 0f3674f531
1 file changed
+1
+1
View File
@@ -458,6 +458,7 @@ int KYTY_SYSV_ABI KernelOpen(const char* path, int flags, uint16_t mode) {
file->real_name = g_mount_points->ResolvePath(file->name);
if (trunc && rw_mode == Common::File::Mode::Read) {
g_files->DeleteDescriptor(descriptor);
return KERNEL_ERROR_EACCES;
}