summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-08-28 15:02:42 +0800
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:52 +0200
commitc858a0709f991171256db74f4329a1cb8e823764 (patch)
tree8851a31963e23e8e6126abe0f4ee68cbf3edea86 /fs/ceph
parentd37b1d9943d5138b9b2630b7b7082629a82a1386 (diff)
ceph: fix NULL pointer dereference in ceph_flush_snaps()
Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 662ada467c32..5daf86621871 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1469,7 +1469,7 @@ out:
if (psession) {
*psession = session;
- } else {
+ } else if (session) {
mutex_unlock(&session->s_mutex);
ceph_put_mds_session(session);
}