diff options
author | yinsimei | 2017-06-06 01:59:44 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | 839e7fb4d2d51c6abd38d1cc56a2d2cbd346d710 (patch) | |
tree | d7a8ed3ab2b99ca1864efa744989029dfd603b46 /engines/sludge/newfatal.cpp | |
parent | 77d5c7235d5ad0aa36abc3625e0716582ee52318 (diff) | |
download | scummvm-rg350-839e7fb4d2d51c6abd38d1cc56a2d2cbd346d710.tar.gz scummvm-rg350-839e7fb4d2d51c6abd38d1cc56a2d2cbd346d710.tar.bz2 scummvm-rg350-839e7fb4d2d51c6abd38d1cc56a2d2cbd346d710.zip |
SLUDGE: fix unmatched delete[] leaks
Diffstat (limited to 'engines/sludge/newfatal.cpp')
-rw-r--r-- | engines/sludge/newfatal.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sludge/newfatal.cpp b/engines/sludge/newfatal.cpp index bc97d6a610..a44290ab36 100644 --- a/engines/sludge/newfatal.cpp +++ b/engines/sludge/newfatal.cpp @@ -81,7 +81,7 @@ void warning(const char *l) { } void registerWindowForFatal() { - delete fatalInfo; + delete[] fatalInfo; fatalInfo = joinStrings("There's an error with this SLUDGE game! If you're designing this game, please turn on verbose error messages in the project manager and recompile. If not, please contact the author saying where and how this problem occured.", ""); } @@ -126,7 +126,7 @@ int checkNew(const void *mem) { } void setFatalInfo(const char *userFunc, const char *BIF) { - delete fatalInfo; + delete[] fatalInfo; fatalInfo = new char[strlen(userFunc) + strlen(BIF) + 38]; if (fatalInfo) sprintf(fatalInfo, "Currently in this sub: %s\nCalling: %s", userFunc, BIF); |