From: Danny Al-Gaaf Date: Wed, 22 May 2013 15:25:16 +0000 (+0200) Subject: mds/Migrator.cc: fix possible dereference NULL return value X-Git-Tag: v0.64~72^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32b024c6c6b38b7baf8a649789f752df1296bade;p=ceph.git 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 --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 2874c67b54bb..61d9f8e8c65d 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;