forked from qt-creator/qt-creator
Ssh: fix crash on freed memory access
At the cleanup() method we must remove connection from the m_connection list to avoid access to the freed memory from the removeInactiveConnections() that caused Qt Creator crash. Change-Id: I8195f05e903819e3e3b48b2f72fd71047c5a1636 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -151,6 +151,7 @@ private:
|
|||||||
|
|
||||||
disconnect(connection, nullptr, this, nullptr);
|
disconnect(connection, nullptr, this, nullptr);
|
||||||
connection->deleteLater();
|
connection->deleteLater();
|
||||||
|
m_connections.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeInactiveConnections()
|
void removeInactiveConnections()
|
||||||
|
Reference in New Issue
Block a user