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

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Mininaut
2026-09-12 16:44:45 +03:00
committed by GitHub
parent a21ffde34e
commit 0f3674f531
+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;
}