mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-22 23:29:16 +02: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);
|
parameters);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (proxy != NULL)
|
g_clear_object (&proxy);
|
||||||
g_object_unref (proxy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
@ -1101,11 +1100,9 @@ on_properties_changed (GDBusConnection *connection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (changed_properties != NULL)
|
g_clear_pointer (&changed_properties, g_variant_unref);
|
||||||
g_variant_unref (changed_properties);
|
|
||||||
g_free (invalidated_properties);
|
g_free (invalidated_properties);
|
||||||
if (proxy != NULL)
|
g_clear_object (&proxy);
|
||||||
g_object_unref (proxy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
@ -1357,8 +1354,7 @@ on_name_owner_changed (GDBusConnection *connection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (proxy != NULL)
|
g_clear_object (&proxy);
|
||||||
g_object_unref (proxy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user