[Scummvm-git-logs] scummvm master -> 319fcb7c97e7dd486a937b38d9ad28e51bd3bc88
bluegr
noreply at scummvm.org
Mon Aug 5 19:11:57 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:
319fcb7c97 NANCY: Fix leak in scene.cpp
Commit: 319fcb7c97e7dd486a937b38d9ad28e51bd3bc88
https://github.com/scummvm/scummvm/commit/319fcb7c97e7dd486a937b38d9ad28e51bd3bc88
Author: scummvmuser (150493071+scummvmuser at users.noreply.github.com)
Date: 2024-08-05T22:11:53+03:00
Commit Message:
NANCY: Fix leak in scene.cpp
`buf` wasn't freed.
The assignment to `description` copies the string; no need for heap here.
Changed paths:
engines/nancy/state/scene.cpp
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 99e76e79d4b..36225439197 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -102,7 +102,7 @@ void Scene::SceneSummary::read(Common::SeekableReadStream &stream) {
}
void Scene::SceneSummary::readTerse(Common::SeekableReadStream &stream) {
- char *buf = new char[0x32];
+ char buf[0x32];
stream.read(buf, 0x32);
description = buf;
readFilename(stream, videoFile);
More information about the Scummvm-git-logs
mailing list