fixed leak on exit in CWaitForResponse::Clear()
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 9 Dec 2013 15:38:53 +0000 (16:38 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 9 Dec 2013 15:38:53 +0000 (16:38 +0100)
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();
 }