From 32b024c6c6b38b7baf8a649789f752df1296bade Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 22 May 2013 17:25:16 +0200 Subject: [PATCH] mds/Migrator.cc: fix possible dereference NULL return value ID 716998 (#1 of 2): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null "in" when calling "operator <<(std::ostream &, CInode &)". CID 716998 (#2 of 2): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null "in" when calling "MDCache::add_replica_dir(ceph::buffer::list::iterator &, CInode *, int, std::list > &)". Signed-off-by: Danny Al-Gaaf --- src/mds/Migrator.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 2874c67b54bb2..61d9f8e8c65d6 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -1777,6 +1777,7 @@ void Migrator::handle_export_prep(MExportDirPrep *m) dout(10) << " had " << *cur << dendl; } else if (start == 'f') { in = cache->get_inode(df.ino); + assert(in); dout(10) << " had " << *in << dendl; cur = cache->add_replica_dir(q, in, oldauth, finished); dout(10) << " added " << *cur << dendl; -- 2.39.5