summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-08-21 12:14:32 +0200
committerRay Strode <halfline@gmail.com>2020-09-09 13:27:55 +0000
commitc836977bc78be5b8c75228c131d26dee8bd09a97 (patch)
tree772251f812d6e79c5cee17f3bb1ad08d38542452
parent6e6ba2fc297b2cdba2ac80016d1f80942b6898a5 (diff)
downloadgdm-c836977bc78be5b8c75228c131d26dee8bd09a97.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 3249cb9e..22f023fd 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;