]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
loopback: Don't free credentials borrowed from the connection
authorSimon McVittie <smcv@collabora.com>
Wed, 11 Jul 2018 15:15:38 +0000 (16:15 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 2 Aug 2018 16:10:19 +0000 (17:10 +0100)
We currently get away with this because the connection isn't fully
freed before we exit, but the connection is meant to own the result
of _dbus_connection_get_credentials() (it's "(transfer none)" in
GLib terminology).

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

test/loopback.c

index 5ab8be9c2f0f9c43b870a351839535a148f5d237..23fe4c8bf4e57a976df469b4aa0b882e54607031 100644 (file)
@@ -302,7 +302,6 @@ test_connect (Fixture *f,
                   _dbus_string_get_const_data (&cred_string));
   g_assert_cmpstr (_dbus_string_get_const_data (&cred_string), !=, NULL);
   _dbus_string_free (&cred_string);
-  _dbus_clear_credentials (&creds);
 
   dbus_free (address);
 }