]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Migrator.cc: fix possible dereference NULL return value
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 May 2013 15:25:16 +0000 (17:25 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 May 2013 15:25:16 +0000 (17:25 +0200)
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<Context *, std::allocator<Context *> > &)".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mds/Migrator.cc

index 2874c67b54bb2c90ea867606cf2f062a257dab3d..61d9f8e8c65d689822e640d01a599b5a1e9b85c7 100644 (file)
@@ -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;