HUGO: Properly deallocate _arrayBmp

Fixing a potential memory leak reported by deepcode.ai
This commit is contained in:
Lothar Serra Mari 2020-05-31 16:37:03 +02:00
parent efc1840c51
commit 39c1949251

View File

@ -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();