From 191085a8821b35680bba16ce5411fc9dbe912237 Mon Sep 17 00:00:00 2001 From: Manuel Romei Date: Sun, 18 Jan 2026 17:20:12 +0100 Subject: [PATCH] ipc: use deleteLater() in IpcServerConnection to prevent use-after-free --- src/ipc/ipc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipc/ipc.cpp b/src/ipc/ipc.cpp index 32d8482..40e8f0c 100644 --- a/src/ipc/ipc.cpp +++ b/src/ipc/ipc.cpp @@ -61,7 +61,7 @@ IpcServerConnection::IpcServerConnection(QLocalSocket* socket, IpcServer* server void IpcServerConnection::onDisconnected() { qCInfo(logIpc) << "IPC connection disconnected" << this; - delete this; + this->deleteLater(); } void IpcServerConnection::onReadyRead() { @@ -88,7 +88,7 @@ void IpcServerConnection::onReadyRead() { // async connections reparent if (dynamic_cast(this->parent()) != nullptr) { - delete this; + this->deleteLater(); } }