[Scummvm-git-logs] scummvm branch-2-9 -> 02b1e210a87ba89d6917f11226d6e26cb9ca6715
criezy
noreply at scummvm.org
Wed Nov 27 23:05:48 UTC 2024
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:
02b1e210a8 AGS: Fix potential memory leak in ccInstance::CreateEx
Commit: 02b1e210a87ba89d6917f11226d6e26cb9ca6715
https://github.com/scummvm/scummvm/commit/02b1e210a87ba89d6917f11226d6e26cb9ca6715
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2024-11-27T23:05:43Z
Commit Message:
AGS: Fix potential memory leak in ccInstance::CreateEx
The issues was fixed in a different way in master to match what was
done upstream. But I prefer to commit a simpler change for the
release branch.
Changed paths:
engines/ags/engine/script/cc_instance.cpp
diff --git a/engines/ags/engine/script/cc_instance.cpp b/engines/ags/engine/script/cc_instance.cpp
index b23e13854cb..23f10f80d5c 100644
--- a/engines/ags/engine/script/cc_instance.cpp
+++ b/engines/ags/engine/script/cc_instance.cpp
@@ -219,6 +219,7 @@ ccInstance *ccInstance::CreateEx(PScript scri, const ccInstance *joined) {
// allocate and copy all the memory with data, code and strings across
ccInstance *cinst = new ccInstance();
if (!cinst->_Create(scri, joined)) {
+ delete cinst;
return nullptr;
}
return cinst;
More information about the Scummvm-git-logs
mailing list