From 15be2c601874b5ea8317151e99a293202851cc74 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Wed, 17 Jul 2013 19:57:01 +0900 Subject: [PATCH] Fix called C++ object pointer is null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Duval --- src/bin/bfs_tools/lib/Inode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/bfs_tools/lib/Inode.cpp b/src/bin/bfs_tools/lib/Inode.cpp index f13b615cc9..9f4634fdee 100644 --- a/src/bin/bfs_tools/lib/Inode.cpp +++ b/src/bin/bfs_tools/lib/Inode.cpp @@ -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!