mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
HUGO: Properly deallocate _arrayBmp
Fixing a potential memory leak reported by deepcode.ai
This commit is contained in:
parent
efc1840c51
commit
39c1949251
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user