From 21967eef1aedb046f7260c3fc58e0b046908d793 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Mon, 4 Mar 2024 14:55:44 +0100 Subject: Fix access of unitialized variables in DisplayIndicator destructor In the constructor nGreeterSubscription and pConnection are only initialized if bGreeter is true whereas the destructor always accesses them and possibly passes uninitialized values to functions. --- src/service.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service.cpp b/src/service.cpp index f3fd33b..a8d6839 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -1141,8 +1141,8 @@ private: GSettings *pMetacitySettings = NULL; GSettings *pColorSchemeSettings = NULL; gboolean bTest; - guint nGreeterSubscription; - GDBusConnection *pConnection; + guint nGreeterSubscription = 0; + GDBusConnection *pConnection = NULL; gchar *sUser = NULL; GSList *lUsers = NULL; gboolean bReadingAccountsService = FALSE; -- cgit v1.2.3