Fix called C++ object pointer is null
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
2aa0e54e4f
commit
15be2c6018
@ -621,8 +621,10 @@ Inode::EmptyInode(Disk *disk, const char *name, int32 mode)
|
||||
}
|
||||
|
||||
Inode *object = new (std::nothrow) Inode(disk, inode);
|
||||
if (object == NULL)
|
||||
if (object == NULL) {
|
||||
free(inode);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
object->AcquireBuffer();
|
||||
// this must not be deleted anymore!
|
||||
|
Loading…
Reference in New Issue
Block a user