[Scummvm-git-logs] scummvm master -> 39017d2bb298c2e79edf791e680eccb06f55bd0a
sluicebox
noreply at scummvm.org
Sun Aug 25 19:38:54 UTC 2024
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cd755fc663 GRAPHICS: Fix memory leak in TTF font
b43cbf76ed DIRECTOR: LINGO: Fix memory leak
82a9d3f76a HYPNO: Fix memory leak
39017d2bb2 MOHAWK: Fix memory leak
Commit: cd755fc66327f7d7df94ecff64df334f7a452b60
https://github.com/scummvm/scummvm/commit/cd755fc66327f7d7df94ecff64df334f7a452b60
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-08-25T12:26:47-07:00
Commit Message:
GRAPHICS: Fix memory leak in TTF font
Changed paths:
graphics/fonts/ttf.cpp
diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp
index 8d5afd7d09c..2eed481b29c 100644
--- a/graphics/fonts/ttf.cpp
+++ b/graphics/fonts/ttf.cpp
@@ -995,6 +995,7 @@ Font *findTTFace(const Common::Array<Common::Path> &files, const Common::U32Stri
for (Common::Array<Common::Path>::const_iterator it = files.begin(); it != files.end(); it++) {
Common::File *ttfFile = new Common::File();
if (!ttfFile->open(*it)) {
+ delete ttfFile;
continue;
}
@@ -1004,8 +1005,6 @@ Font *findTTFace(const Common::Array<Common::Path> &files, const Common::U32Stri
// Load face index -1 to get the count
if (!g_ttf.loadFont(ttfFile, &stream, -1, face)) {
delete ttfFile;
- ttfFile = 0;
-
continue;
}
Commit: b43cbf76ed754028bf3237d81b7dfd591522abcc
https://github.com/scummvm/scummvm/commit/b43cbf76ed754028bf3237d81b7dfd591522abcc
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-08-25T12:31:54-07:00
Commit Message:
DIRECTOR: LINGO: Fix memory leak
Changed paths:
engines/director/lingo/lingo-mci.cpp
diff --git a/engines/director/lingo/lingo-mci.cpp b/engines/director/lingo/lingo-mci.cpp
index e35e60e340c..11874811bee 100644
--- a/engines/director/lingo/lingo-mci.cpp
+++ b/engines/director/lingo/lingo-mci.cpp
@@ -445,9 +445,12 @@ void Lingo::func_mci(const Common::String &name) {
Audio::AudioStream *sound = Audio::makeWAVStream(file, DisposeAfterUse::YES);
if (parsedCmd.parameters.contains("alias")) {
_audioAliases[parsedCmd.parameters["alias"].string] = sound;
+ } else {
+ delete sound;
}
} else {
warning("func_mci(): Unhandled audio type %s", parsedCmd.parameters["type"].string.c_str());
+ delete file;
}
}
break;
Commit: 82a9d3f76ad7a76a2543e1dbba1b79e74aadea2a
https://github.com/scummvm/scummvm/commit/82a9d3f76ad7a76a2543e1dbba1b79e74aadea2a
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-08-25T12:33:12-07:00
Commit Message:
HYPNO: Fix memory leak
Changed paths:
engines/hypno/hypno.cpp
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index e56150edb42..197011da306 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -595,8 +595,10 @@ void HypnoEngine::playSound(const Common::String &filename, uint32 loops, uint32
if (file->open(name)) {
stream = new Audio::LoopingAudioStream(Audio::makeRawStream(file, sampleRate, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES), loops);
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream, -1, Audio::Mixer::kMaxChannelVolume);
- } else
+ } else {
debugC(1, kHypnoDebugMedia, "%s not found!", name.toString().c_str());
+ delete file;
+ }
}
}
Commit: 39017d2bb298c2e79edf791e680eccb06f55bd0a
https://github.com/scummvm/scummvm/commit/39017d2bb298c2e79edf791e680eccb06f55bd0a
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-08-25T12:35:56-07:00
Commit Message:
MOHAWK: Fix memory leak
Changed paths:
engines/mohawk/resource.cpp
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index bdcfcc8607f..1db5943ed2e 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -47,6 +47,7 @@ bool Archive::openFile(const Common::Path &fileName) {
}
if (!openStream(file)) {
+ delete file;
close();
return false;
}
More information about the Scummvm-git-logs
mailing list