From 711a00856b780aec6bb09aa3f3613f8dd3872a3d Mon Sep 17 00:00:00 2001 From: neuromancer Date: Mon, 13 Jun 2022 11:16:29 +0200 Subject: [PATCH] HYPNO: fix memory leak of boxes image in boyz --- engines/hypno/boyz/arcade.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp index 7283d75f3d9..c8fdf70c2f1 100644 --- a/engines/hypno/boyz/arcade.cpp +++ b/engines/hypno/boyz/arcade.cpp @@ -303,6 +303,8 @@ bool BoyzEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting Graphics::Surface *boxes = frame->convertTo(frame->format, _background->decoder->getPalette()); drawImage(*boxes, 0, 0, false); drawScreen(); + boxes->free(); + delete boxes; _selectedCorrectBox = pickABox(); if (_selectedCorrectBox == 1) { _background->decoder->forceSeekToFrame(582);