[Scummvm-git-logs] scummvm master -> b1e1494a121c30a216eca317e5c2631465a8d44d
neuromancer
neuromancer at users.noreply.github.com
Sun Mar 7 14:52:52 UTC 2021
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:
b1e1494a12 PRIVATE: fixed two more memory leaks
Commit: b1e1494a121c30a216eca317e5c2631465a8d44d
https://github.com/scummvm/scummvm/commit/b1e1494a121c30a216eca317e5c2631465a8d44d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-03-07T11:51:56-03:00
Commit Message:
PRIVATE: fixed two more memory leaks
Changed paths:
engines/private/funcs.cpp
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index b55ba16580..54d34f5961 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -492,11 +492,11 @@ static void fCRect(ArgArray args) {
x2 = args[2].u.val;
y2 = args[3].u.val;
- Datum *d = new Datum();
+ Datum d = Datum();
Common::Rect *rect = new Common::Rect(x1, y1, x2, y2);
- d->type = RECT;
- d->u.rect = rect;
- Gen::push(*d);
+ d.type = RECT;
+ d.u.rect = rect;
+ Gen::push(d);
}
static void fBitmap(ArgArray args) {
@@ -678,6 +678,8 @@ static void fTimer(ArgArray args) {
assert(g_private->installTimer(delay, s));
} else if (delay == 0) {
g_private->_nextSetting = *s;
+ // No need to keep the pointer alive
+ delete s;
} else {
assert(0);
}
More information about the Scummvm-git-logs
mailing list