Fix called C++ object pointer is null

Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2013-07-17 18:29:29 +02:00
committed by Jérôme Duval
parent 2aa0e54e4f
commit 15be2c6018
+3 -1
View File
@@ -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!