diff options
author | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-08-31 16:36:16 +0200 |
---|---|---|
committer | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-10-29 12:38:33 +0200 |
commit | e3332b75059de1e83482b5786f55d639acf90faa (patch) | |
tree | dcd0991c237cf6bfee0ae86743c0e367b2acc7ce | |
parent | fbf5a75553e0d26bf47a38b0b337f24d9b75de06 (diff) | |
download | gdm-e3332b75059de1e83482b5786f55d639acf90faa.tar.gz |
gdm-common: Add missing guards in public functions
-rw-r--r-- | common/gdm-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c index 92029027..3e31f426 100644 --- a/common/gdm-common.c +++ b/common/gdm-common.c @@ -360,6 +360,10 @@ gdm_activate_session_by_id (GDBusConnection *connection, GError *local_error = NULL; GVariant *reply; + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), FALSE); + g_return_val_if_fail (seat_id != NULL, FALSE); + g_return_val_if_fail (session_id != NULL, FALSE); + reply = g_dbus_connection_call_sync (connection, "org.freedesktop.login1", "/org/freedesktop/login1", @@ -392,6 +396,8 @@ gdm_get_login_window_session_id (const char *seat_id, char *service_class; char *state; + g_return_val_if_fail (session_id != NULL, FALSE); + res = sd_seat_get_sessions (seat_id, &sessions, NULL, NULL); if (res < 0) { g_debug ("Failed to determine sessions: %s", strerror (-res)); |