mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 01:08:19 +00:00
trivial: Fix a tiny memory leak on startup
The property value is a floating reference, and so if we're not using it as a parameter to g_variant_new() we need to unref it manually.
This commit is contained in:
parent
19ba35c844
commit
34fcc02052
@ -125,8 +125,10 @@ fu_main_emit_property_changed (FuMainPrivate *priv,
|
||||
GVariantBuilder invalidated_builder;
|
||||
|
||||
/* not yet connected */
|
||||
if (priv->connection == NULL)
|
||||
if (priv->connection == NULL) {
|
||||
g_variant_unref (g_variant_ref_sink (property_value));
|
||||
return;
|
||||
}
|
||||
|
||||
/* build the dict */
|
||||
g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
|
||||
|
Loading…
Reference in New Issue
Block a user