Add missing DeleteHandle calls

Whoops
This commit is contained in:
Stephen Miller 2025-04-28 13:15:17 -05:00 committed by GitHub
parent 5a5a42c503
commit 32b34f9261
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,6 +133,7 @@ s32 PS4_SYSV_ABI open(const char* raw_path, s32 flags, u16 mode) {
return -1;
} else {
// Invalid flags
h->DeleteHandle(handle);
*__Error() = POSIX_EINVAL;
return -1;
}
@ -169,6 +170,7 @@ s32 PS4_SYSV_ABI open(const char* raw_path, s32 flags, u16 mode) {
e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::ReadWrite);
} else {
// Invalid flags
h->DeleteHandle(handle);
*__Error() = POSIX_EINVAL;
return -1;
}