mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
UI: Fix zip leak in error case.
This commit is contained in:
parent
a49a0fc076
commit
4832434865
1 changed files with 5 additions and 0 deletions
|
@ -289,11 +289,16 @@ bool GameManager::InstallGame(const std::string &url, const std::string &fileNam
|
|||
File::CreateFullPath(dest);
|
||||
File::CreateEmptyFile(dest + "/.nomedia");
|
||||
return InstallMemstickGame(z, fileName, dest, info, true, deleteAfter);
|
||||
} else {
|
||||
zip_close(z);
|
||||
z = nullptr;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
ERROR_LOG(HLE, "File not a PSP game, no EBOOT.PBP found.");
|
||||
SetInstallError(sy->T("Not a PSP game"));
|
||||
zip_close(z);
|
||||
z = nullptr;
|
||||
if (deleteAfter)
|
||||
File::Delete(fileName);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue