[Scummvm-git-logs] scummvm master -> 39c19492510af2ea155ecae073acc8a546adc662

lotharsm mail at serra.me
Sun May 31 15:02:30 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:
39c1949251 HUGO: Properly deallocate _arrayBmp


Commit: 39c19492510af2ea155ecae073acc8a546adc662
    https://github.com/scummvm/scummvm/commit/39c19492510af2ea155ecae073acc8a546adc662
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-05-31T17:02:26+02:00

Commit Message:
HUGO: Properly deallocate _arrayBmp

Fixing a potential memory leak reported by deepcode.ai

Changed paths:
    engines/hugo/dialogs.cpp


diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index c741c6a837..c2caf421e0 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -124,7 +124,7 @@ void TopMenu::reflowLayout() {
 void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {
 	_arraySize = in.readUint16BE();
 
-	delete _arrayBmp;
+	delete[] _arrayBmp;
 	_arrayBmp = new Graphics::Surface *[_arraySize * 2];
 	for (int i = 0; i < _arraySize; i++) {
 		uint16 bmpSize = in.readUint16BE();




More information about the Scummvm-git-logs mailing list