[Scummvm-git-logs] scummvm master -> 69584d21c48ed0a504b13991248f05ee32e26c25
bluegr
noreply at scummvm.org
Sat Dec 16 20:33:27 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:
69584d21c4 COMMON: Fix stream leak if res fork load fails
Commit: 69584d21c48ed0a504b13991248f05ee32e26c25
https://github.com/scummvm/scummvm/commit/69584d21c48ed0a504b13991248f05ee32e26c25
Author: elasota (1137273+elasota at users.noreply.github.com)
Date: 2023-12-16T22:33:23+02:00
Commit Message:
COMMON: Fix stream leak if res fork load fails
Changed paths:
common/macresman.cpp
diff --git a/common/macresman.cpp b/common/macresman.cpp
index 23d4603dc9d..5432e82d367 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -230,8 +230,10 @@ bool MacResManager::open(const Path &fileName, Archive &archive) {
_baseFileName = fileName;
stream = archive.createReadStreamForMemberAltStream(fileName, AltStreamType::MacResourceFork);
- if (stream && !loadFromRawFork(stream))
+ if (stream && !loadFromRawFork(stream)) {
+ delete stream;
_stream = nullptr;
+ }
// If the archive member exists, then the file exists, but has no res fork, so we should return true
return true;
More information about the Scummvm-git-logs
mailing list