]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Added NULL check before dereference 16750/head
authoramitkuma <amitkuma@redhat.com>
Wed, 2 Aug 2017 16:36:54 +0000 (22:06 +0530)
committeramitkuma <amitkuma@redhat.com>
Wed, 2 Aug 2017 17:24:29 +0000 (22:54 +0530)
Fixed:

** 1405291 Explicit null dereferenced.
CID 1405291 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
10. var_deref_op: Dereferencing null pointer s.

Signed-off-by: Amit Kumar amitkuma@redhat.com
src/client/Client.cc

index 6b34e4a330e43df4983fc48be64fd78045675a49..db113f18063641da2cbdb2349dc489e1f62a1c44 100644 (file)
@@ -12900,6 +12900,7 @@ void Client::ms_handle_remote_reset(Connection *con)
        }
       }
       if (mds >= 0) {
+       assert (s != NULL);
        switch (s->state) {
        case MetaSession::STATE_CLOSING:
          ldout(cct, 1) << "reset from mds we were closing; we'll call that closed" << dendl;