path: root/src/dbus/qdbus_symbols_p.h
diff options
authorThiago Macieira <>2015-01-01 22:06:18 -0200
committerThiago Macieira <>2015-01-11 03:39:40 +0100
commitfb166648936410f791ae6e600756d255b4a50545 (patch)
treeb28dce8b7f28a8b933268478610e66b86c43de74 /src/dbus/qdbus_symbols_p.h
parenta90bb5b89a09490a1795064133f6d8ce33b6874e (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 <>
Diffstat (limited to 'src/dbus/qdbus_symbols_p.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index 0785fea4b4..4bec3af490 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -323,6 +323,8 @@ DEFINEFUNC(void , dbus_pending_call_unref, (DBusPendingCall
/* dbus-server.h */
DEFINEFUNC(dbus_bool_t , dbus_server_allocate_data_slot, (dbus_int32_t *slot_p),
(slot_p), return)
+DEFINEFUNC(void , dbus_server_free_data_slot, (dbus_int32_t *slot_p),
+ (slot_p), return)
DEFINEFUNC(void , dbus_server_disconnect, (DBusServer *server),
(server), )
DEFINEFUNC(char* , dbus_server_get_address, (DBusServer *server),