From: Danny Al-Gaaf Date: Wed, 22 May 2013 15:17:01 +0000 (+0200) Subject: mds/Migrator.cc: fix dereference NULL return value X-Git-Tag: v0.64~72^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7ba34c138498f4bf8024bd42d6787f1d425ae21a;p=ceph.git mds/Migrator.cc: fix dereference NULL return value 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 --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index f0deb7f88250..fd3d45c5081c 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -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& bounds) void Migrator::import_reverse_unfreeze(CDir *dir) { + assert(dir); dout(7) << "import_reverse_unfreeze " << *dir << dendl; dir->unfreeze_tree(); list ls;