Ticket #9880: 0010-Fix-called-C-object-pointer-is-null.patch

File 0010-Fix-called-C-object-pointer-is-null.patch, 797 bytes (added by mt, 11 years ago)

Patch

  • src/bin/bfs_tools/lib/Inode.cpp

    From 38de3cff96baadc96db9f13853476301ba2cf3c8 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Wed, 17 Jul 2013 19:57:01 +0900
    Subject: [PATCH] Fix called C++ object pointer is null
    
    ---
     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 f13b615..9f4634f 100644
    a b Inode::EmptyInode(Disk *disk, const char *name, int32 mode)  
    621621    }
    622622
    623623    Inode *object = new (std::nothrow) Inode(disk, inode);
    624     if (object == NULL)
     624    if (object == NULL) {
    625625        free(inode);
     626        return NULL;
     627    }
    626628
    627629    object->AcquireBuffer();
    628630        // this must not be deleted anymore!