fixed leak on exit in CWaitForResponse::Clear()
[deb_libcec.git] / src / lib / devices / CECBusDevice.cpp
index c9699d8f96f6f46dcf3ce1d54cce543e646ae2af..eac78b0352ca9c21b9a5612c7c09bfa79f937b3a 100644 (file)
@@ -94,7 +94,10 @@ void CWaitForResponse::Clear()
 {
   PLATFORM::CLockObject lock(m_mutex);
   for (std::map<cec_opcode, CResponse*>::iterator it = m_waitingFor.begin(); it != m_waitingFor.end(); it++)
+  {
     it->second->Broadcast();
+    delete it->second;
+  }
   m_waitingFor.clear();
 }