Fix Valgrind report at End of RS

XXXX bytes in XX blocks are still reachable in loss record.
This commit is contained in:
Phenom 2020-11-26 19:13:54 +01:00
parent 1ee38877ca
commit 3fff0869a2

View File

@ -720,6 +720,7 @@ void RsGxsDataAccess::processRequests()
{ {
if(now > mRequestQueue.begin()->second->reqTime + MAX_REQUEST_AGE) if(now > mRequestQueue.begin()->second->reqTime + MAX_REQUEST_AGE)
{ {
delete mRequestQueue.begin()->second;
mRequestQueue.erase(mRequestQueue.begin()); mRequestQueue.erase(mRequestQueue.begin());
continue; continue;
} }
@ -735,6 +736,7 @@ void RsGxsDataAccess::processRequests()
#ifdef DATA_DEBUG #ifdef DATA_DEBUG
RsDbg() << " request " << mRequestQueue.begin()->second->token << ": status = " << mRequestQueue.begin()->second->status << ": removing from the RequestQueue" << std::endl; RsDbg() << " request " << mRequestQueue.begin()->second->token << ": status = " << mRequestQueue.begin()->second->status << ": removing from the RequestQueue" << std::endl;
#endif #endif
delete mRequestQueue.begin()->second;
mRequestQueue.erase(mRequestQueue.begin()); mRequestQueue.erase(mRequestQueue.begin());
continue; continue;
break; break;
@ -746,7 +748,7 @@ void RsGxsDataAccess::processRequests()
} }
} }
} } // END OF MUTEX.
if (!req) if (!req)
break; break;
@ -837,9 +839,9 @@ void RsGxsDataAccess::processRequests()
RsDbg() << " Request failed. Marking as FAILED." << std::endl; RsDbg() << " Request failed. Marking as FAILED." << std::endl;
#endif #endif
} }
}
} // END OF MUTEX. } // END OF MUTEX.
}
} }