[Scummvm-git-logs] scummvm master -> 55951c8df60feb83f994d8c9060912bf3db8df19
athrxx
noreply at scummvm.org
Mon Sep 19 19:51:54 UTC 2022
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:
55951c8df6 KYRA: fix mem leak
Commit: 55951c8df60feb83f994d8c9060912bf3db8df19
https://github.com/scummvm/scummvm/commit/55951c8df60feb83f994d8c9060912bf3db8df19
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-19T21:51:16+02:00
Commit Message:
KYRA: fix mem leak
Changed paths:
engines/kyra/engine/util.cpp
diff --git a/engines/kyra/engine/util.cpp b/engines/kyra/engine/util.cpp
index 57dba2080c7..4e451484f25 100644
--- a/engines/kyra/engine/util.cpp
+++ b/engines/kyra/engine/util.cpp
@@ -276,13 +276,17 @@ void Util::mergeUpdateJohabChars(uint16 &destJohabChar0, uint16 &destJohabChar1,
Common::String Util::decodeString1(const Common::String &src) {
char *tmp = new char[src.size() * 2 + 2];
Util::decodeString1(src.c_str(), tmp);
- return tmp;
+ Common::String reslt(tmp);
+ delete[] tmp;
+ return reslt;
}
Common::String Util::decodeString2(const Common::String &src) {
char *tmp = new char[src.size() * 2 + 2];
Util::decodeString2(src.c_str(), tmp);
- return tmp;
+ Common::String reslt(tmp);
+ delete[] tmp;
+ return reslt;
}
Common::String Util::findMacResourceFile(const char *baseName) {
More information about the Scummvm-git-logs
mailing list