From 5c53dc5e13396a8e105d77a7110f4fd5978f28e1 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Thu, 27 Jan 2022 20:14:17 +1000 Subject: [PATCH] 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 Reviewed-by: hjk Reviewed-by: --- src/libs/ssh/sshconnectionmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/ssh/sshconnectionmanager.cpp b/src/libs/ssh/sshconnectionmanager.cpp index fff3db499ea..800c4f14f19 100644 --- a/src/libs/ssh/sshconnectionmanager.cpp +++ b/src/libs/ssh/sshconnectionmanager.cpp @@ -151,6 +151,7 @@ private: disconnect(connection, nullptr, this, nullptr); connection->deleteLater(); + m_connections.erase(it); } void removeInactiveConnections()