From 1404c36e2b3e658e919cd344ca75caa5ad360414 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Mon, 19 Sep 2022 14:55:34 +0200 Subject: [PATCH] Deviceshell: Fix use after free Change-Id: I6caa22e53bee2db332ced7301534683d7a064905 Reviewed-by: Reviewed-by: Jarek Kobus --- src/libs/utils/deviceshell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/deviceshell.cpp b/src/libs/utils/deviceshell.cpp index 75a8cbb2604..cf9d2139550 100644 --- a/src/libs/utils/deviceshell.cpp +++ b/src/libs/utils/deviceshell.cpp @@ -247,7 +247,7 @@ DeviceShell::RunResult DeviceShell::run(const CommandLine &cmd, const QByteArray const int id = ++m_currentId; const auto it = m_commandOutput.insert(id, CommandRun{{-1, {}, {}}, &waiter}); - QMetaObject::invokeMethod(m_shellProcess, [this, id, &cmd, &stdInData]() { + QMetaObject::invokeMethod(m_shellProcess, [this, id, cmd, stdInData]() { const QString command = QString("%1 \"%2\" %3\n") .arg(id) .arg(QString::fromLatin1(stdInData.toBase64()))