diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-01-01 22:06:18 -0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-01-11 03:39:40 +0100 |
commit | fb166648936410f791ae6e600756d255b4a50545 (patch) | |
tree | b28dce8b7f28a8b933268478610e66b86c43de74 /src/dbus/qdbusserver.cpp | |
parent | a90bb5b89a09490a1795064133f6d8ce33b6874e (diff) |
Fix memory leaks with QDBusServer
Two serious mistakes:
- we need to call dbus_server_free_data_slot as many times as we call
dbus_server_allocate_data_slot
- we need to delete the d pointer...
The changes to the unit tests are simply to cause the used peer
connections to be removed so they don't show up in valgrind.
Change-Id: I9fd1ada5503db9ba481806c09116874ee81f450d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/dbus/qdbusserver.cpp')
-rw-r--r-- | src/dbus/qdbusserver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp index b2c76a8750..3fec7c9111 100644 --- a/src/dbus/qdbusserver.cpp +++ b/src/dbus/qdbusserver.cpp @@ -110,6 +110,7 @@ QDBusServer::~QDBusServer() } d->serverConnectionNames.clear(); } + d->deleteLater(); } /*! |