Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSLzma: Fix a file handle leak in GSDumpLzma #11118

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

CookiePLMonster
Copy link
Contributor

Description of Changes

Moves the file handle to a base GSDump class and makes it managed, to make it impossible to miss closing it again.

Rationale behind Changes

Playing back LZMA dumps leaked the file handle.

Suggested Testing Steps

  1. Launch PCSX2.
  2. Play back any LZMA GSDump and shut it down without shutting down PCSX2.
  3. Observe that it is now possible to delete the dump from disk without shutting down PCSX2, long as the dump is not running of course. Without this PR, PCSX2 must be entirely closed to allow to close the file.

@github-actions github-actions bot added the GS label Apr 21, 2024
@CookiePLMonster
Copy link
Contributor Author

Updated to hopefully make Codacy happier.

@stenzek stenzek merged commit e97fc40 into PCSX2:master Apr 23, 2024
12 checks passed
@CookiePLMonster CookiePLMonster deleted the gsdump-handle-leak branch April 23, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants