[Scummvm-git-logs] scummvm master -> 388faf75653c7904475cbb0ab5186425b207e346

rvanlaar noreply at scummvm.org
Fri Aug 23 14:21:20 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:
388faf7565 DIRECTOR: Fix memory leak


Commit: 388faf75653c7904475cbb0ab5186425b207e346
    https://github.com/scummvm/scummvm/commit/388faf75653c7904475cbb0ab5186425b207e346
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-08-23T16:20:29+02:00

Commit Message:
DIRECTOR: Fix memory leak

Stream wasn't deleted after use when loading CastLibMapping.

Changed paths:
    engines/director/movie.cpp


diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index 3908ef83357..bba3f452ab3 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -127,6 +127,7 @@ void Movie::setArchive(Archive *archive) {
 	if ((r = archive->getMovieResourceIfPresent(MKTAG('M', 'C', 's', 'L'))) != nullptr) {
 		// D5 archive, can contain multiple internal/external casts
 		loadCastLibMapping(*r);
+		delete r;
 	} else {
 		// D4 or lower, only 1 cast
 		_cast->setArchive(archive);




More information about the Scummvm-git-logs mailing list