QDBusConnectionPrivate: Protect access to serverConnectionNames with mutex
This list is accessed by ~QDBusServerConnection in a user thead. Task-number: QTBUG-116621 Change-Id: Ic115612b2a0f12fd9f69f38f4662dc36fffbf178 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
eacff46af4
commit
178a5d15ef
@ -306,7 +306,10 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v
|
||||
manager->addConnection(
|
||||
"QDBusServer-"_L1 + QString::number(reinterpret_cast<qulonglong>(newConnection), 16),
|
||||
newConnection);
|
||||
serverConnection->serverConnectionNames << newConnection->name;
|
||||
{
|
||||
QWriteLocker locker(&serverConnection->lock);
|
||||
serverConnection->serverConnectionNames << newConnection->name;
|
||||
}
|
||||
|
||||
// setPeer does the error handling for us
|
||||
QDBusErrorInternal error;
|
||||
|
Loading…
Reference in New Issue
Block a user