fix for potential double free
This commit is contained in:
@@ -384,12 +384,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual ~BusHandler() {
|
virtual ~BusHandler() {
|
||||||
stop();
|
stop();
|
||||||
|
join();
|
||||||
BusRequest* req;
|
BusRequest* req;
|
||||||
while ((req = m_finishedRequests.pop())!=NULL) {
|
while ((req = m_finishedRequests.pop())!=NULL) {
|
||||||
delete req;
|
delete req;
|
||||||
}
|
}
|
||||||
while ((req = m_nextRequests.pop())!=NULL) {
|
while ((req = m_nextRequests.pop())!=NULL) {
|
||||||
delete req;
|
if (req->m_deleteOnFinish) {
|
||||||
|
delete req;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (m_currentRequest!=NULL) {
|
if (m_currentRequest!=NULL) {
|
||||||
delete m_currentRequest;
|
delete m_currentRequest;
|
||||||
|
|||||||
Reference in New Issue
Block a user