From 33d90412c19002b4c892d5ac693c051cbe81905d Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Mon, 28 Feb 2011 19:16:18 +0100 Subject: SWORD2: Plug a memory leak in psx version Free buffer used to resize psx sprite in drawTextObject --- engines/sword2/animation.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/sword2') diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 2fafb70fea..e75e38ad81 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -237,6 +237,10 @@ void MoviePlayer::drawTextObject(uint32 index, byte *screen, uint16 pitch) { src += width; dst += pitch; } + + // Free buffer used to resize psx sprite + if (Sword2Engine::isPsx()) + free(src); } } -- cgit v1.2.3