Skip to content

Commit

Permalink
client: Added NULL check before dereference
Browse files Browse the repository at this point in the history
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
  • Loading branch information
amitkuma committed Aug 2, 2017
1 parent 31cd44f commit 9e4ab4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9e4ab4a

Please sign in to comment.