diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2020-12-15 12:58:21 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2021-02-11 16:06:27 +0000 |
commit | 137a9bdcc2ef77580d6ba695d2748496b75e2c27 (patch) | |
tree | 209c339bbc7a21394ba110fecd0256dde4608581 | |
parent | a1db705bc2b88f3dc4fd07ab8a57a2786081fcba (diff) | |
download | glib-137a9bdcc2ef77580d6ba695d2748496b75e2c27.tar.gz |
gdbusauth: Use g_clear_object() to simplify the code a little
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r-- | gio/gdbusauth.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c index 14cc5d70e..8a076ce20 100644 --- a/gio/gdbusauth.c +++ b/gio/gdbusauth.c @@ -1348,12 +1348,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth, "Not implemented (server)"); out: - if (mech != NULL) - g_object_unref (mech); - if (dis != NULL) - g_object_unref (dis); - if (dos != NULL) - g_object_unref (dos); + g_clear_object (&mech); + g_clear_object (&dis); + g_clear_object (&dos); /* ensure return value is FALSE if error is set */ if (error != NULL && *error != NULL) |