ipc: use deleteLater() in IpcServerConnection to prevent use-after-free

This commit is contained in:
Manuel Romei authored and outfoxxed committed 2026-01-21 00:50:39 -08:00
1 parent 8fd0de4580
commit 191085a882
1 file changed
+2 -2
+2 -2
View File
@@ -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<IpcServer*>(this->parent()) != nullptr) {
delete this;
this->deleteLater();
}
}