]> 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:21:59 +0000 (17:21 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 May 2013 15:21:59 +0000 (17:21 +0200)
CID 716999 (#1 of 1): Dereference null return value (NULL_RETURNS)
  dereference: Dereferencing a pointer that might be null "in" when
  calling "CInode::put_stickydirs()".

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

index fd3d45c5081ca047028e7c671d760f9c6de0a360..c93f76601f87ce122a1272ffcf8b17cf06927c4f 100644 (file)
@@ -1992,7 +1992,8 @@ void Migrator::import_remove_pins(CDir *dir, set<CDir*>& bounds)
       continue;
     did.insert(p->ino);
     CInode *in = cache->get_inode(p->ino);
-      in->put_stickydirs();
+    assert(in);
+    in->put_stickydirs();
   }
 
   if (import_state[dir->dirfrag()] >= IMPORT_PREPPED) {