fix for potential double free

This commit is contained in:
john30
2017-01-07 10:53:25 +01:00
parent 5eacc4314f
commit 3a537ee25e
+4 -1
View File
@@ -384,12 +384,15 @@ public:
*/
virtual ~BusHandler() {
stop();
join();
BusRequest* req;
while ((req = m_finishedRequests.pop())!=NULL) {
delete req;
}
while ((req = m_nextRequests.pop())!=NULL) {
delete req;
if (req->m_deleteOnFinish) {
delete req;
}
}
if (m_currentRequest!=NULL) {
delete m_currentRequest;