aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/inventory.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-05-21 21:06:30 +0000
committerNicola Mettifogo2007-05-21 21:06:30 +0000
commit7d2809108e9a4c89d7d17e87539d893458a5e3b4 (patch)
tree9e80a7186f5ca22292f6480820d35b32efb00208 /engines/parallaction/inventory.cpp
parent8bc84330596829f129e9c00ca2c1711f73685cb6 (diff)
downloadscummvm-rg350-7d2809108e9a4c89d7d17e87539d893458a5e3b4.tar.gz
scummvm-rg350-7d2809108e9a4c89d7d17e87539d893458a5e3b4.tar.bz2
scummvm-rg350-7d2809108e9a4c89d7d17e87539d893458a5e3b4.zip
Fixed the largest memory leaks.
svn-id: r26905
Diffstat (limited to 'engines/parallaction/inventory.cpp')
-rw-r--r--engines/parallaction/inventory.cpp6
1 files changed, 6 insertions, 0 deletions
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++) {