diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-31 18:28:07 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-31 19:15:22 +0200 |
commit | 2a024091831ba194b68d716f0a9104972aa520d5 (patch) | |
tree | a5667d692ce4112c1339e06aa2dcfb13e52f5f9f | |
parent | 39a53e5c72c0c02165cbb282bf940f48ae317d6a (diff) | |
download | ceph-2a024091831ba194b68d716f0a9104972aa520d5.tar.gz |
mds/Locker.cc: fix explicit null dereferenced
CID 716916 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
var_deref_model: Passing null pointer "in" to function
"CInode::is_head()", which dereferences it.
Add assert.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/mds/Locker.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 57154b3d9f6..127db262b46 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -615,6 +615,7 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<C bool need_issue = false; int loner_issued = 0, other_issued = 0, xlocker_issued = 0; + assert(!caps || in != NULL); if (caps && in->is_head()) { in->get_caps_issued(&loner_issued, &other_issued, &xlocker_issued, lock->get_cap_shift(), lock->get_cap_mask()); |