mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-27 16:02:37 +00:00
fix KernelLseek lock leak
Co-authored-by: Stefanos Costa <stefanos.costa1999@gmail.com>
This commit is contained in:
1 parent
f380d69b9d
commit
b9aa0dc3b3
1 file changed
+1
-3
@@ -803,7 +803,7 @@ int64_t KYTY_SYSV_ABI KernelLseek(int d, int64_t offset, int whence) {
|
||||
return KERNEL_ERROR_ESPIPE;
|
||||
}
|
||||
|
||||
file->mutex.Lock();
|
||||
Common::LockGuard lock(file->mutex);
|
||||
|
||||
bool is_invalid = file->f.IsInvalid();
|
||||
|
||||
@@ -828,8 +828,6 @@ int64_t KYTY_SYSV_ABI KernelLseek(int d, int64_t offset, int whence) {
|
||||
|
||||
EXIT_IF(pos != offset);
|
||||
|
||||
file->mutex.Unlock();
|
||||
|
||||
if (is_invalid) {
|
||||
LOGF("\tfile is invalid\n");
|
||||
return KERNEL_ERROR_EIO;
|
||||
|
||||
Reference in new issue
Block a user