mds/Server.cc: fix explicit null dereferenced

CID 716928 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
  var_deref_model: Passing null pointer "session" to function
  "Session::trim_completed_requests(tid_t)", which dereferences it.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf 2013-05-28 12:55:19 +02:00
parent fbf5a242d9
commit 39a53e5c72

View File

@ -1115,6 +1115,7 @@ void Server::handle_client_request(MClientRequest *req)
// trim completed_request list
if (req->get_oldest_client_tid() > 0) {
dout(15) << " oldest_client_tid=" << req->get_oldest_client_tid() << dendl;
assert(session);
session->trim_completed_requests(req->get_oldest_client_tid());
}