From dfac9b34c234c8ad9e01d3cad46f86ad705fd0f5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 28 Sep 2012 17:56:34 -0700 Subject: [PATCH] mds: dentry always has dir CID 716912: Dereference after null check (FORWARD_NULL) At (3): Passing null pointer "this->dir" to function "CDir::ino() const", which dereferences it. [hide details] Signed-off-by: Sage Weil --- src/mds/CDentry.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mds/CDentry.cc b/src/mds/CDentry.cc index ee58436123a12..7dd88ac10a79a 100644 --- a/src/mds/CDentry.cc +++ b/src/mds/CDentry.cc @@ -260,8 +260,7 @@ void CDentry::make_path(string& s, inodeno_t tobase) void CDentry::make_anchor_trace(vector& trace, CInode *in) { // start with parent dir inode - if (dir) - dir->inode->make_anchor_trace(trace); + dir->inode->make_anchor_trace(trace); // add this inode (in my dirfrag) to the end trace.push_back(Anchor(in->ino(), dir->ino(), get_hash(), 0, 0)); -- 2.39.5