gpowerprofilemonitordbus: Fix a memory leak

get_cached_property() returns a new reference.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2021-09-06 18:54:06 +01:00
parent 5b90f9d088
commit 28ad07373a

View File

@ -126,6 +126,7 @@ ppd_proxy_cb (GObject *source_object,
g_object_notify (G_OBJECT (dbus), "power-saver-enabled");
}
}
g_clear_pointer (&active_profile_variant, g_variant_unref);
dbus->signal_id = g_signal_connect (G_OBJECT (proxy), "g-properties-changed",
G_CALLBACK (ppd_properties_changed_cb), dbus);