aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorMax Horn2006-09-09 14:54:41 +0000
committerMax Horn2006-09-09 14:54:41 +0000
commitab82dc3f9c18342eb4cd62d2a05c0845d2939eef (patch)
treedcd78eb8a342dac4d1a8d1adb34c5829e25092cc /engines/kyra
parente78a81fe45d5466b12fdce688f217f6c6e6f716d (diff)
downloadscummvm-rg350-ab82dc3f9c18342eb4cd62d2a05c0845d2939eef.tar.gz
scummvm-rg350-ab82dc3f9c18342eb4cd62d2a05c0845d2939eef.tar.bz2
scummvm-rg350-ab82dc3f9c18342eb4cd62d2a05c0845d2939eef.zip
Fix memory leak
svn-id: r23848
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/resource.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 455d01d7d5..92c669bbb8 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -95,8 +95,6 @@ bool Resource::loadPakFile(const Common::String &filename) {
uint32 size = 0;
- FilesystemNode *fsNode = new FilesystemNode(ConfMan.get("path") + filename);
-
Common::File handle;
if (!fileHandle(filename.c_str(), &size, handle)) {
warning("couldn't load file: '%s'", filename.c_str());
@@ -104,6 +102,7 @@ bool Resource::loadPakFile(const Common::String &filename) {
}
PAKFile *file = 0;
+ FilesystemNode *fsNode = new FilesystemNode(ConfMan.get("path") + filename);
if (handle.name() == filename) {
file = new PAKFile(fsNode->name().c_str(), handle.name(), (_engine->features() & GF_AMIGA) != 0);