vapi: avoid memory leak
Erase removed elements to avoid memory leaks. Type: fix Change-Id: I1605bea8df7e08455691364efb0a12eb0d9dae93 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
This commit is contained in:
Klement Sekera
committed by
Ole Tr�an
parent
f46c5525d2
commit
0f4febfac3
@ -422,7 +422,7 @@ private:
|
||||
void unregister_request (Common_req *request)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock (requests_mutex);
|
||||
std::remove (requests.begin (), requests.end (), request);
|
||||
requests.erase (std::remove (requests.begin (), requests.end (), request));
|
||||
}
|
||||
|
||||
template <typename M> void register_event (Event_registration<M> *event)
|
||||
|
Reference in New Issue
Block a user