Correct memleak introduced by !1885

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
Frederic Martinsons 2021-01-26 15:27:01 +01:00
parent 2696384e0e
commit 98abfc9da7

View File

@ -613,6 +613,7 @@ stop_service (GDBusConnection *connection,
{
GError *error = NULL;
GDBusProxy *proxy = NULL;
GVariant *result = NULL;
data->num_vanished = 0;
@ -626,7 +627,7 @@ stop_service (GDBusConnection *connection,
&error);
g_assert_no_error (error);
g_dbus_proxy_call_sync (proxy,
result = g_dbus_proxy_call_sync (proxy,
"Quit",
NULL,
G_DBUS_CALL_FLAGS_NO_AUTO_START,
@ -635,6 +636,8 @@ stop_service (GDBusConnection *connection,
&error);
g_assert_no_error (error);
g_object_unref (proxy);
if (result)
g_variant_unref (result);
while (data->num_vanished == 0)
g_main_loop_run (loop);
}