diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-04-27 22:34:26 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-05-09 05:30:46 +0000 |
commit | ad66dbe305cff72443f4d3484191872d56e6dfbb (patch) | |
tree | bc14f53ca994153d8be7989a0141bc8f21e1549f /src/dbus/qdbusconnection_p.h | |
parent | 8de2986a42ff452d2ca7f28d23ce1156be326b62 (diff) |
Disconnect signals from each QObject only once in QDBusConnectionPrivate
Because the moment we disconnect from the object's destroyed() signal,
it may get destroyed in another thread. If the same object appears more
than once in the object tree or in the signal hook table, we could be
accessing a dangling pointer.
Task-number: QTBUG-52988
Change-Id: Ifea6e497f11a461db432ffff14496f0f83889104
Reviewed-by: Weng Xuetian <wengxt@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusconnection_p.h')
-rw-r--r-- | src/dbus/qdbusconnection_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index b733a68856..fff9f29b03 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -254,7 +254,7 @@ private: const QVector<int> &metaTypes, int slotIdx); SignalHookHash::Iterator removeSignalHookNoLock(SignalHookHash::Iterator it); - void disconnectObjectTree(ObjectTreeNode &node); + void collectAllObjects(ObjectTreeNode &node, QSet<QObject *> &set); bool isServiceRegisteredByThread(const QString &serviceName); |