summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-29 15:14:28 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-31 19:15:23 +0200
commit91f6b0f04bd716983dd9cef607295545b06bd6d3 (patch)
treea8235a311e32cb7e16d876cbcea59193581fc353
parent38ee69c2f53c412829f656813ef6b5219e8b055e (diff)
downloadceph-91f6b0f04bd716983dd9cef607295545b06bd6d3.tar.gz
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 <danny.al-gaaf@bisect.de>
-rw-r--r--src/mds/MDCache.cc1
1 files changed, 1 insertions, 0 deletions
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);