test_peer_ping: Don't leak one method call per invocation

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
This commit is contained in:
Simon McVittie 2017-11-21 10:50:37 +00:00
parent f058394a0e
commit 173f694b91

View 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;