aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2007-08-09 11:42:26 +0000
committerNicola Mettifogo2007-08-09 11:42:26 +0000
commitd340961f78a365da5d1d7bf42c3e0637003283cf (patch)
tree214b2c88ffbe21ab083e114624d492b9ee52c253
parent4c9a865e80bef2fed1df58a355d3089535d77641 (diff)
downloadscummvm-rg350-d340961f78a365da5d1d7bf42c3e0637003283cf.tar.gz
scummvm-rg350-d340961f78a365da5d1d7bf42c3e0637003283cf.tar.bz2
scummvm-rg350-d340961f78a365da5d1d7bf42c3e0637003283cf.zip
Fixed some memory leaks.
svn-id: r28503
-rw-r--r--engines/parallaction/disk_ns.cpp2
-rw-r--r--engines/parallaction/zone.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index 7cb410d647..c111525011 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -1295,6 +1295,8 @@ void AmigaDisk_ns::loadSlide(const char *name) {
else
loadBackground(name);
+ delete s;
+
return;
}
diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp
index 582b9738e7..ed033e79ed 100644
--- a/engines/parallaction/zone.cpp
+++ b/engines/parallaction/zone.cpp
@@ -604,6 +604,8 @@ Zone::Zone() {
Zone::~Zone() {
// printf("~Zone(%s)\n", _label._text);
+ _label._cnv.free();
+
switch (_type & 0xFFFF) {
case kZoneExamine:
free(u.examine->_filename);
@@ -626,8 +628,10 @@ Zone::~Zone() {
case kZoneGet:
free(u.get->_backup);
- if (u.get->_cnv)
+ if (u.get->_cnv) {
+ u.get->_cnv->free();
delete u.get->_cnv;
+ }
delete u.get;
break;