mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 22:46:15 +01:00
Correct memleak introduced by !1885
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
parent
2696384e0e
commit
98abfc9da7
@ -613,6 +613,7 @@ stop_service (GDBusConnection *connection,
|
|||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GDBusProxy *proxy = NULL;
|
GDBusProxy *proxy = NULL;
|
||||||
|
GVariant *result = NULL;
|
||||||
|
|
||||||
data->num_vanished = 0;
|
data->num_vanished = 0;
|
||||||
|
|
||||||
@ -626,15 +627,17 @@ stop_service (GDBusConnection *connection,
|
|||||||
&error);
|
&error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
|
|
||||||
g_dbus_proxy_call_sync (proxy,
|
result = g_dbus_proxy_call_sync (proxy,
|
||||||
"Quit",
|
"Quit",
|
||||||
NULL,
|
NULL,
|
||||||
G_DBUS_CALL_FLAGS_NO_AUTO_START,
|
G_DBUS_CALL_FLAGS_NO_AUTO_START,
|
||||||
100,
|
100,
|
||||||
NULL,
|
NULL,
|
||||||
&error);
|
&error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_object_unref (proxy);
|
g_object_unref (proxy);
|
||||||
|
if (result)
|
||||||
|
g_variant_unref (result);
|
||||||
while (data->num_vanished == 0)
|
while (data->num_vanished == 0)
|
||||||
g_main_loop_run (loop);
|
g_main_loop_run (loop);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user