From 7d2809108e9a4c89d7d17e87539d893458a5e3b4 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Mon, 21 May 2007 21:06:30 +0000 Subject: Fixed the largest memory leaks. svn-id: r26905 --- engines/parallaction/inventory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/parallaction/inventory.cpp') diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index 39a89db580..52dbd50db0 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -339,6 +339,12 @@ void initInventory() { _buffer = (byte*)malloc(INVENTORY_WIDTH * INVENTORY_HEIGHT); } +void destroyInventory() { + if (_buffer) + free(_buffer); + _buffer = 0; +} + void cleanInventory() { for (uint16 slot = INVENTORY_FIRST_ITEM; slot < INVENTORY_MAX_ITEMS; slot++) { -- cgit v1.2.3