From 91f6b0f04bd716983dd9cef607295545b06bd6d3 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 29 May 2013 15:14:28 +0200 Subject: [PATCH] mds/MDCache.cc: fix dereference null return value CID 716993 (#1 of 2): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null "in" when calling "operator <<(std::ostream &, CInode &)". Add assert for 'in'. Signed-off-by: Danny Al-Gaaf --- src/mds/MDCache.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index f7d5ed5ed8c..330e69507d9 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -4012,6 +4012,7 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak) p != weak->inode_scatterlocks.end(); ++p) { CInode *in = get_inode(p->first); + assert(in); dout(10) << " including base inode (due to potential scatterlock update) " << *in << dendl; acked_inodes.insert(in->vino()); ack->add_inode_base(in); -- 2.47.3