aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2007-10-30 21:57:41 +0000
committerJohannes Schickel2007-10-30 21:57:41 +0000
commite7e0532e1b31b5b125265fae8e39e0e9e8698b36 (patch)
tree8914d1ffdf42b6de60f94af3d601a4427441cc2d /backends
parent0f741540d08f7d73e05e6ae25c0ea4a07fd9e768 (diff)
downloadscummvm-rg350-e7e0532e1b31b5b125265fae8e39e0e9e8698b36.tar.gz
scummvm-rg350-e7e0532e1b31b5b125265fae8e39e0e9e8698b36.tar.bz2
scummvm-rg350-e7e0532e1b31b5b125265fae8e39e0e9e8698b36.zip
- free fib object in AmigaOSFilesystemNode::exists
- cleanup svn-id: r29330
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index d85d64a9bb..20b3cfc4c8 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -266,11 +266,11 @@ AmigaOSFilesystemNode::~AmigaOSFilesystemNode() {
}
bool AmigaOSFilesystemNode::exists() const {
+ ENTER();
if(_sPath.empty())
return false;
bool nodeExists = false;
- ENTER();
struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
if (!fib) {
@@ -281,17 +281,18 @@ bool AmigaOSFilesystemNode::exists() const {
BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK);
if (pLock) {
- if (IDOS->Examine(pLock, fib) != DOSFALSE) {
+ if (IDOS->Examine(pLock, fib) != DOSFALSE)
nodeExists = true;
- }
IDOS->UnLock(pLock);
}
+ IDOS->FreeDosObject(DOS_FIB, fib);
LEAVE();
return nodeExists;
}
AbstractFilesystemNode *AmigaOSFilesystemNode::getChild(const String &n) const {
+ ENTER();
if (!_bIsDirectory) {
debug(6, "Not a directory");
return 0;
@@ -312,6 +313,7 @@ AbstractFilesystemNode *AmigaOSFilesystemNode::getChild(const String &n) const {
IDOS->UnLock(lock);
+ LEAVE();
return new AmigaOSFilesystemNode(newPath);
}