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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user