Commit 8ed36cc6 authored by Richard Hughes's avatar Richard Hughes
Browse files

trivial: Fix a tiny memory leak when processing signals from the daemon

parent ba19b180
...@@ -119,11 +119,11 @@ fwupd_client_properties_changed_cb (GDBusProxy *proxy, ...@@ -119,11 +119,11 @@ fwupd_client_properties_changed_cb (GDBusProxy *proxy,
FwupdClient *client) FwupdClient *client)
{ {
FwupdClientPrivate *priv = GET_PRIVATE (client); FwupdClientPrivate *priv = GET_PRIVATE (client);
GVariantDict dict; g_autoptr(GVariantDict) dict = NULL;
/* print to the console */ /* print to the console */
g_variant_dict_init (&dict, changed_properties); dict = g_variant_dict_new (changed_properties);
if (g_variant_dict_contains (&dict, "Status")) { if (g_variant_dict_contains (dict, "Status")) {
g_autoptr(GVariant) val = NULL; g_autoptr(GVariant) val = NULL;
val = g_dbus_proxy_get_cached_property (proxy, "Status"); val = g_dbus_proxy_get_cached_property (proxy, "Status");
if (val != NULL) { if (val != NULL) {
...@@ -134,7 +134,7 @@ fwupd_client_properties_changed_cb (GDBusProxy *proxy, ...@@ -134,7 +134,7 @@ fwupd_client_properties_changed_cb (GDBusProxy *proxy,
g_object_notify (G_OBJECT (client), "status"); g_object_notify (G_OBJECT (client), "status");
} }
} }
if (g_variant_dict_contains (&dict, "Percentage")) { if (g_variant_dict_contains (dict, "Percentage")) {
g_autoptr(GVariant) val = NULL; g_autoptr(GVariant) val = NULL;
val = g_dbus_proxy_get_cached_property (proxy, "Percentage"); val = g_dbus_proxy_get_cached_property (proxy, "Percentage");
if (val != NULL) { if (val != NULL) {
...@@ -142,7 +142,7 @@ fwupd_client_properties_changed_cb (GDBusProxy *proxy, ...@@ -142,7 +142,7 @@ fwupd_client_properties_changed_cb (GDBusProxy *proxy,
g_object_notify (G_OBJECT (client), "percentage"); g_object_notify (G_OBJECT (client), "percentage");
} }
} }
if (g_variant_dict_contains (&dict, "DaemonVersion")) { if (g_variant_dict_contains (dict, "DaemonVersion")) {
g_autoptr(GVariant) val = NULL; g_autoptr(GVariant) val = NULL;
val = g_dbus_proxy_get_cached_property (proxy, "DaemonVersion"); val = g_dbus_proxy_get_cached_property (proxy, "DaemonVersion");
if (val != NULL) if (val != NULL)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment