]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Migrator.cc: fix dereference after null check
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 29 May 2013 13:37:31 +0000 (15:37 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 31 May 2013 17:15:23 +0000 (19:15 +0200)
Add assert for 'le' to fix:

CID 716923 (#1 of 1): Dereference after null check (FORWARD_NULL)
  var_deref_model: Passing null pointer "le" to function
  "LogEvent::get_start_off() const", which dereferences it.

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

index 92962424e4688f39c6c03b2da32d5f68ead8649e..9fe5451432ebce3765b890799b2f4ce723b823f1 100644 (file)
@@ -2518,6 +2518,7 @@ int Migrator::decode_import_dir(bufferlist::iterator& blp,
     }
     else if (icode == 'I') {
       // inode
+      assert(le);
       decode_import_inode(dn, blp, oldauth, ls, le->get_start_off(), cap_imports, updated_scatterlocks);
     }