Skip to content

Commit

Permalink
Merge pull request #18788 from amitkumar50/cov-mon-1
Browse files Browse the repository at this point in the history
mon: NULL check of logger before use

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
yuriw committed Jan 9, 2018
2 parents c231b9c + 150288e commit a5159a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3849,8 +3849,7 @@ void Monitor::remove_all_sessions()
while (!session_map.sessions.empty()) {
MonSession *s = session_map.sessions.front();
remove_session(s);
if (logger)
logger->inc(l_mon_session_rm);
logger->inc(l_mon_session_rm);
}
if (logger)
logger->set(l_mon_num_sessions, session_map.get_size());
Expand Down

0 comments on commit a5159a4

Please sign in to comment.