mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
ipc: use deleteLater() in IpcServerConnection to prevent use-after-free
This commit is contained in:
1 parent
8fd0de4580
commit
191085a882
1 file changed
+2
-2
+2
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user