mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-30 21:04:13 +02:00
Plug mem leaks in gdbus tests & examples
Use "&s" instead of "s", and free the variant iters after use. Bug #618663.
This commit is contained in:
@@ -56,7 +56,7 @@ test_methods (GDBusConnection *connection,
|
||||
g_assert_no_error (error);
|
||||
g_assert (result != NULL);
|
||||
g_assert_cmpstr (g_variant_get_type_string (result), ==, "(s)");
|
||||
g_variant_get (result, "(s)", &str);
|
||||
g_variant_get (result, "(&s)", &str);
|
||||
g_assert_cmpstr (str, ==, "You greeted me with 'Hey'. Thanks!");
|
||||
g_variant_unref (result);
|
||||
|
||||
|
Reference in New Issue
Block a user