diff options
author | Benjamin Berg <bberg@redhat.com> | 2020-08-21 12:14:32 +0200 |
---|---|---|
committer | Ignacio Casal Quinteiro <qignacio@amazon.com> | 2020-10-30 11:13:07 +0100 |
commit | 0c6e50b77e10093ab6cfe8de0d7295c3501fbf64 (patch) | |
tree | 429dc61ac880ca0631bebfd62f8059ff5194ebad | |
parent | 2c5a27a740a4a8a2c397e52d13a7ac3a060f8d5d (diff) | |
download | gdm-0c6e50b77e10093ab6cfe8de0d7295c3501fbf64.tar.gz |
manager: Fix possible crash by initializing display
Some people insist on running sessions in ways where we cannot detect
them properly. In that case, we shouldn't find a display, but the
variable was not initialized and we could end up accessing random memory
resulting in a crash.
Fix it by adding the missing initializer.
Closes: #555
-rw-r--r-- | daemon/gdm-manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index efcce9b6..25beecb5 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -811,7 +811,7 @@ gdm_manager_handle_register_session (GdmDBusManager *manager, GVariant *details) { GdmManager *self = GDM_MANAGER (manager); - GdmDisplay *display; + GdmDisplay *display = NULL; const char *sender; GDBusConnection *connection; |