From: Danny Al-Gaaf Date: Wed, 22 May 2013 15:28:06 +0000 (+0200) Subject: mds/Migrator.cc: fix possible dereference NULL return value X-Git-Tag: v0.64~72^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=549e547b3bf89aecd35e4b770a410762800d0ac5;p=ceph.git mds/Migrator.cc: fix possible dereference NULL return value CID 716997 (#1 of 1): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null "in" when calling "MDSCacheObject::is_auth() const". Signed-off-by: Danny Al-Gaaf --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 61d9f8e8c65d..e7f4e27fecb0 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -2635,6 +2635,7 @@ void Migrator::handle_export_caps(MExportCaps *ex) dout(10) << "handle_export_caps " << *ex << " from " << ex->get_source() << dendl; CInode *in = cache->get_inode(ex->ino); + assert(in); assert(in->is_auth()); /* * note: i may be frozen, but i won't have been encoded for export (yet)!