mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Merge pull request #1985 from lioncash/master
Fix a resource leak and possible unintentionally executed code.
This commit is contained in:
commit
8ca2e30747
@ -2957,11 +2957,14 @@ void __KernelSwitchContext(Thread *target, const char *reason)
|
||||
oldUID, oldPC, currentThread, currentMIPS->pc);
|
||||
}
|
||||
|
||||
// No longer waiting.
|
||||
target->nt.waitType = WAITTYPE_NONE;
|
||||
target->nt.waitID = 0;
|
||||
if (target)
|
||||
{
|
||||
// No longer waiting.
|
||||
target->nt.waitType = WAITTYPE_NONE;
|
||||
target->nt.waitID = 0;
|
||||
|
||||
__KernelExecutePendingMipsCalls(target, true);
|
||||
__KernelExecutePendingMipsCalls(target, true);
|
||||
}
|
||||
}
|
||||
|
||||
void __KernelChangeThreadState(Thread *thread, ThreadStatus newStatus) {
|
||||
|
@ -41,7 +41,10 @@ EmuFileType Identify_File(const char *filename)
|
||||
|
||||
size_t readSize = fread(&id,4,1,f);
|
||||
if(readSize != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return FILETYPE_ERROR;
|
||||
}
|
||||
|
||||
psar_id = 0;
|
||||
fseek(f, 0x24, SEEK_SET);
|
||||
|
Loading…
Reference in New Issue
Block a user