]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Migrator.cc: fix dereference NULL return value
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 May 2013 15:17:01 +0000 (17:17 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 May 2013 15:17:01 +0000 (17:17 +0200)
CID 717000 (#1 of 2): Dereference null return value (NULL_RETURNS)
  dereference: Dereferencing a pointer that might be null "dir" when
  calling "operator <<(std::ostream &, CDir &)".

CID 717000 (#2 of 2): Dereference null return value (NULL_RETURNS)
  dereference: Dereferencing a pointer that might be null "dir" when
  calling "Migrator::import_reverse_unfreeze(CDir *)".

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

index f0deb7f882505b68cceeff4546f37f81e9ffa21a..fd3d45c5081ca047028e7c671d760f9c6de0a360 100644 (file)
@@ -435,6 +435,7 @@ void Migrator::handle_mds_failure_or_stop(int who)
     } else {
       if (q->second == IMPORT_ABORTING &&
          import_bystanders[dir].count(who)) {
+       assert(dir);
        dout(10) << "faking export_notify_ack from mds." << who
                 << " on aborting import " << *dir << " from mds." << import_peer[df] 
                 << dendl;
@@ -2154,6 +2155,7 @@ void Migrator::import_notify_abort(CDir *dir, set<CDir*>& bounds)
 
 void Migrator::import_reverse_unfreeze(CDir *dir)
 {
+  assert(dir);
   dout(7) << "import_reverse_unfreeze " << *dir << dendl;
   dir->unfreeze_tree();
   list<Context*> ls;