From: Danny Al-Gaaf Date: Wed, 29 May 2013 13:14:28 +0000 (+0200) Subject: mds/MDCache.cc: fix dereference null return value X-Git-Tag: v0.65~168^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=91f6b0f04bd716983dd9cef607295545b06bd6d3;p=ceph.git 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 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index f7d5ed5ed8cc8..330e69507d96c 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);