[Scummvm-git-logs] scummvm master -> db11ff30fa5d7aab0f0d122bf5f658dd2fb3a152
sluicebox
noreply at scummvm.org
Mon Oct 30 01:16:47 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
db11ff30fa COMMON: Fix MacResManager memory leak. PVS-Studio V773
Commit: db11ff30fa5d7aab0f0d122bf5f658dd2fb3a152
https://github.com/scummvm/scummvm/commit/db11ff30fa5d7aab0f0d122bf5f658dd2fb3a152
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-10-29T18:16:23-07:00
Commit Message:
COMMON: Fix MacResManager memory leak. PVS-Studio V773
Changed paths:
common/macresman.cpp
diff --git a/common/macresman.cpp b/common/macresman.cpp
index fa819dd5b16..f8d741ab85d 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -194,11 +194,10 @@ SeekableReadStream *MacResManager::openAppleDoubleWithAppleOrOSXNaming(Archive&
stream = archive.createReadStreamForMember(newPath);
if (!stream) {
- Common::FSNode *fsn = new Common::FSNode(newPath);
- if (fsn && fsn->exists())
- stream = fsn->createReadStream();
- else
- delete fsn;
+ Common::FSNode fsn(newPath);
+ if (fsn.exists()) {
+ stream = fsn.createReadStream();
+ }
}
if (stream) {
More information about the Scummvm-git-logs
mailing list