[Scummvm-git-logs] scummvm master -> 10b88aae66b346e9cab6de36a145072da869f4c0

criezy criezy at scummvm.org
Wed Nov 4 23:06:50 UTC 2020


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:
10b88aae66 GRIM: Fix alloc-dealloc mismatch in grim engine


Commit: 10b88aae66b346e9cab6de36a145072da869f4c0
    https://github.com/scummvm/scummvm/commit/10b88aae66b346e9cab6de36a145072da869f4c0
Author: Mathias Parnaudeau (mparnaudeau at optimum-software.fr)
Date: 2020-11-04T23:06:46Z

Commit Message:
GRIM: Fix alloc-dealloc mismatch in grim engine

A previous fix in ResidualVM changed 2 calls to free() into delete
operators because scumm_strdup() was using the new operator.
Later scumm_strdup() switched to malloc() to be aligned with strdup()
function. So move back to free().

Changed paths:
    engines/grim/textsplit.cpp


diff --git a/engines/grim/textsplit.cpp b/engines/grim/textsplit.cpp
index 68973c6ca9..42d6cb9199 100644
--- a/engines/grim/textsplit.cpp
+++ b/engines/grim/textsplit.cpp
@@ -235,8 +235,8 @@ static void parse(const char *line, const char *fmt, int field_count, va_list va
 				break;
 		}
 	}
-	delete[] str;
-	delete[] format;
+	free(str);
+	free(format);
 
 	if (count < field_count) {
 		error("Expected line of format '%s', got '%s'", fmt, line);




More information about the Scummvm-git-logs mailing list