[Scummvm-git-logs] scummvm master -> 2d85158214dc87724e488c274ceaa45d2365f5c0
sluicebox
noreply at scummvm.org
Wed Sep 17 19:53:59 UTC 2025
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2b9dabbc5d GOB: Fix memory leak
c2875a31a8 MACVENTURE: Fix memory leak in diploma dialog
e86b04ab6b MADE: Fix PCSpeaker memory leaks
2b8c1dc50b SLUDGE: Fix memory leaks
2d85158214 ULTIMA8: Fix memory leak
Commit: 2b9dabbc5dc31ac37ce6956f33b1891f0d304ab5
https://github.com/scummvm/scummvm/commit/2b9dabbc5dc31ac37ce6956f33b1891f0d304ab5
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-09-17T12:22:18-07:00
Commit Message:
GOB: Fix memory leak
CID 1610105
Changed paths:
engines/gob/databases.cpp
diff --git a/engines/gob/databases.cpp b/engines/gob/databases.cpp
index 13c78b3ed27..7495b5c7c11 100644
--- a/engines/gob/databases.cpp
+++ b/engines/gob/databases.cpp
@@ -26,6 +26,7 @@
*/
#include "common/file.h"
+#include "common/ptr.h"
#include "common/textconsole.h"
#include "gob/databases.h"
@@ -194,7 +195,7 @@ bool Database::openTable(const Common::String &id, const Common::Path &file) {
return false;
}
- dBase *db = new dBase();
+ Common::ScopedPtr<dBase> db(new dBase());
if (!db->load(dbFile)) {
warning("Database::open(): Failed loading database file \"%s\"", file.toString().c_str());
return false;
@@ -232,7 +233,7 @@ bool Database::openTable(const Common::String &id, const Common::Path &file) {
db->loadMultipleIndex(mdxFile);
}
- _tables.setVal(id, db);
+ _tables.setVal(id, db.release());
return true;
}
Commit: c2875a31a82c8f83fd668aaf7ea1a27d97a37064
https://github.com/scummvm/scummvm/commit/c2875a31a82c8f83fd668aaf7ea1a27d97a37064
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-09-17T12:22:18-07:00
Commit Message:
MACVENTURE: Fix memory leak in diploma dialog
CID 1620026
Changed paths:
engines/macventure/gui.cpp
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 985d931c6b1..a16c0943cd4 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -592,11 +592,10 @@ void Gui::loadDiploma() {
quitButton->setAction(kDAQuit);
// Image
- Common::Path diplomaFilePath = _engine->getDiplomaFileName();
- _resourceManager->open(diplomaFilePath);
- Common::SeekableReadStream *stream = _resourceManager->getResource(MKTAG('P', 'P', 'I', 'C'), 0);
-
if (!_diplomaImage) {
+ Common::Path diplomaFilePath = _engine->getDiplomaFileName();
+ _resourceManager->open(diplomaFilePath);
+ Common::SeekableReadStream *stream = _resourceManager->getResource(MKTAG('P', 'P', 'I', 'C'), 0);
_diplomaImage = new ImageAsset(stream);
}
Commit: e86b04ab6b8cc5a5dd7efacb958c9b85a3c390f6
https://github.com/scummvm/scummvm/commit/e86b04ab6b8cc5a5dd7efacb958c9b85a3c390f6
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-09-17T12:22:18-07:00
Commit Message:
MADE: Fix PCSpeaker memory leaks
Follow up to e6be031b89e43e7a96d55d7ecd0fba1d7fd6f8d8
CID 1618344
CID 1618346
Changed paths:
engines/made/scriptfuncs.cpp
engines/made/scriptfuncs.h
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index d8751387658..7904e5bb876 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -50,10 +50,10 @@ ScriptFunctions::ScriptFunctions(MadeEngine *vm) : _vm(vm), _soundStarted(false)
ScriptFunctions::~ScriptFunctions() {
for (uint i = 0; i < _externalFuncs.size(); ++i)
- delete _externalFuncs[i];
+ delete _externalFuncs[i];
- _vm->_system->getMixer()->stopHandle(_pcSpeakerHandle1);
- _vm->_system->getMixer()->stopHandle(_pcSpeakerHandle2);
+ delete _pcSpeaker1;
+ delete _pcSpeaker2;
}
typedef Common::Functor2Mem<int16, int16*, int16, ScriptFunctions> ExternalScriptFunc;
diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h
index 21032f4a13a..db6910e4d9d 100644
--- a/engines/made/scriptfuncs.h
+++ b/engines/made/scriptfuncs.h
@@ -70,7 +70,6 @@ protected:
uint8 _gameAudioVolume;
// PlayNote/StopNote and PlayTele/StopTele wave generators
- Audio::SoundHandle _pcSpeakerHandle1, _pcSpeakerHandle2;
Audio::PCSpeaker *_pcSpeaker1, *_pcSpeaker2;
Common::Array<const ExternalFunc *> _externalFuncs;
Commit: 2b8c1dc50bdec45004454e555de89a141681d4d5
https://github.com/scummvm/scummvm/commit/2b8c1dc50bdec45004454e555de89a141681d4d5
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-09-17T12:22:18-07:00
Commit Message:
SLUDGE: Fix memory leaks
CID 1611709
CID 1611702
CID 1611709
Changed paths:
engines/sludge/backdrop.cpp
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index 5d5a8621c0d..71864cf9c71 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -421,8 +421,10 @@ bool GraphicsManager::loadHSI(int num, Common::SeekableReadStream *stream, int x
// resize backdrop
if (reserve) {
- if (!resizeBackdrop(realPicWidth, realPicHeight))
+ if (!resizeBackdrop(realPicWidth, realPicHeight)) {
+ tmp.free();
return false;
+ }
}
if (x == IN_THE_CENTRE)
@@ -431,6 +433,7 @@ bool GraphicsManager::loadHSI(int num, Common::SeekableReadStream *stream, int x
y = (_sceneHeight - realPicHeight) >> 1;
if (x < 0 || x + realPicWidth > _sceneWidth || y < 0 || y + realPicHeight > _sceneHeight) {
debugC(0, kSludgeDebugGraphics, "Illegal back drop size");
+ tmp.free();
return false;
}
@@ -462,8 +465,10 @@ bool GraphicsManager::mixHSI(int num, Common::SeekableReadStream *stream, int x,
x = (_sceneWidth - realPicWidth) >> 1;
if (y == IN_THE_CENTRE)
y = (_sceneHeight - realPicHeight) >> 1;
- if (x < 0 || x + realPicWidth > _sceneWidth || y < 0 || y + realPicHeight > _sceneHeight)
+ if (x < 0 || x + realPicWidth > _sceneWidth || y < 0 || y + realPicHeight > _sceneHeight) {
+ mixSurface.free();
return false;
+ }
Graphics::ManagedSurface tmp;
tmp.copyFrom(mixSurface);
Commit: 2d85158214dc87724e488c274ceaa45d2365f5c0
https://github.com/scummvm/scummvm/commit/2d85158214dc87724e488c274ceaa45d2365f5c0
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-09-17T12:22:18-07:00
Commit Message:
ULTIMA8: Fix memory leak
CID 1611703
Changed paths:
engines/ultima/ultima8/ultima8.cpp
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index e2b64ea4b0d..df102428127 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -502,6 +502,7 @@ bool Ultima8Engine::setupGame() {
if (info->_type == GameInfo::GAME_UNKNOWN) {
warning("%s: unknown, skipping", info->_name.c_str());
+ delete info;
return false;
}
More information about the Scummvm-git-logs
mailing list