diff options
author | Benjamin Berg <bberg@redhat.com> | 2020-08-21 12:14:32 +0200 |
---|---|---|
committer | Ignacio Casal Quinteiro <qignacio@amazon.com> | 2020-10-29 17:47:46 +0100 |
commit | b7bbd224b0aef9d6c75c876153fdf778b5346fd9 (patch) | |
tree | 45596d307d5a04ef55cf71e241872b4f249f083f | |
parent | 80e010198217284d3cf52e8b334862a80b00cbd1 (diff) | |
download | gdm-b7bbd224b0aef9d6c75c876153fdf778b5346fd9.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 907eca37..e1bc09b1 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; |