resource leaks CID 5711, 5712, 5713, 5714

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39902 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2010-12-20 21:41:49 +00:00
parent 6535040bec
commit 230b9a69d3
4 changed files with 9 additions and 4 deletions
@@ -643,6 +643,7 @@ Inode::Create(Transaction& transaction, Inode* parent, const char* name,
status = inode->InitDirectory(transaction, parent);
if (status != B_OK) {
ERROR("Inode::Create(): InitDirectory() failed\n");
delete inode;
return status;
}
}
@@ -670,8 +671,10 @@ Inode::Create(Transaction& transaction, Inode* parent, const char* name,
TRACE("Inode::Create(): Saving inode\n");
status = inode->WriteBack(transaction);
if (status != B_OK)
if (status != B_OK) {
delete inode;
return status;
}
TRACE("Inode::Create(): Creating vnode\n");
@@ -62,7 +62,8 @@ InodeJournal::InodeJournal(Inode* inode)
if (fInitStatus == B_OK) {
fRevokeManager = revokeManager;
fInitStatus = _LoadSuperBlock();
}
} else
delete revokeManager;
}
}
}
@@ -118,7 +118,8 @@ Journal::Journal(Volume* fsVolume, Volume* jVolume)
if (fInitStatus == B_OK) {
fRevokeManager = revokeManager;
fInitStatus = _LoadSuperBlock();
}
} else
delete revokeManager;
}
}
@@ -204,7 +204,7 @@ ext2_get_vnode(fs_volume* _volume, ino_t id, fs_vnode* _node, int* _type,
return B_NO_MEMORY;
status_t status = inode->InitCheck();
if (status < B_OK)
if (status != B_OK)
delete inode;
if (status == B_OK) {