From 7ba34c138498f4bf8024bd42d6787f1d425ae21a Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 22 May 2013 17:17:01 +0200 Subject: [PATCH] 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 --- src/mds/Migrator.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index f0deb7f8825..fd3d45c5081 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; -- 2.47.3