mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
gdbusproxy: Tidy up some memory management code
Use `g_clear_object()` to tidy things up. This introduces no functional changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
72afc79346
commit
d9dab2b319
@ -889,8 +889,7 @@ on_signal_received (GDBusConnection *connection,
|
||||
parameters);
|
||||
|
||||
out:
|
||||
if (proxy != NULL)
|
||||
g_object_unref (proxy);
|
||||
g_clear_object (&proxy);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
@ -1101,11 +1100,9 @@ on_properties_changed (GDBusConnection *connection,
|
||||
}
|
||||
|
||||
out:
|
||||
if (changed_properties != NULL)
|
||||
g_variant_unref (changed_properties);
|
||||
g_clear_pointer (&changed_properties, g_variant_unref);
|
||||
g_free (invalidated_properties);
|
||||
if (proxy != NULL)
|
||||
g_object_unref (proxy);
|
||||
g_clear_object (&proxy);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
@ -1357,8 +1354,7 @@ on_name_owner_changed (GDBusConnection *connection,
|
||||
}
|
||||
|
||||
out:
|
||||
if (proxy != NULL)
|
||||
g_object_unref (proxy);
|
||||
g_clear_object (&proxy);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user