]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test_peer_ping: Don't leak one method call per invocation
authorSimon McVittie <smcv@collabora.com>
Tue, 21 Nov 2017 10:50:37 +0000 (10:50 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 24 Nov 2017 12:18:45 +0000 (12:18 +0000)
Previously, we allocated m both during initialization, and after
deciding not to skip this test.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103600

test/dbus-daemon.c

index f9d8f92338e297d19f3ae5accb435433e7c21c1d..3d5c147f90207ef3b0b5e25a23cd872908d1b5dc 100644 (file)
@@ -1258,8 +1258,7 @@ static void
 test_peer_ping (Fixture *f,
                 gconstpointer context)
 {
-  DBusMessage *m = dbus_message_new_method_call (DBUS_SERVICE_DBUS,
-      DBUS_PATH_DBUS, DBUS_INTERFACE_PEER, "Ping");
+  DBusMessage *m = NULL;
   DBusPendingCall *pc = NULL;
   DBusError error = DBUS_ERROR_INIT;