[Scummvm-git-logs] scummvm master -> dc0207dc0405d99d92001c49e99ce056d7b540a7

bluegr noreply at scummvm.org
Mon Dec 16 20:00:18 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:
dc0207dc04 SCUMM: HE: Fix alloc-dealloc mismatch in ResExtractor


Commit: dc0207dc0405d99d92001c49e99ce056d7b540a7
    https://github.com/scummvm/scummvm/commit/dc0207dc0405d99d92001c49e99ce056d7b540a7
Author: tunnelsociety (150493071+tunnelsociety at users.noreply.github.com)
Date: 2024-12-16T22:00:14+02:00

Commit Message:
SCUMM: HE: Fix alloc-dealloc mismatch in ResExtractor

CachedCursor->bitmap and palette are allocated via new[] in ::extractResource

Changed paths:
    engines/scumm/he/resource_he.cpp


diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index aef61c6d5d5..c94331cdb49 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -49,8 +49,8 @@ ResExtractor::~ResExtractor() {
 	for (int i = 0; i < MAX_CACHED_CURSORS; ++i) {
 		CachedCursor *cc = &_cursorCache[i];
 		if (cc->valid) {
-			free(cc->bitmap);
-			free(cc->palette);
+			delete[] cc->bitmap;
+			delete[] cc->palette;
 		}
 	}
 




More information about the Scummvm-git-logs mailing list