PolicyKit: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 16 08:59:57 UTC 2023


 src/programs/pkexec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c79ee5595c8d397098978ad50eb521ba2ae8467d
Author: Vincent Mihalkovic <vmihalko at redhat.com>
Date:   Wed Aug 16 08:59:55 2023 +0000

    pkexec: fix uninitialized pointer warning

diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
index 98aa151..f5754c7 100644
--- a/src/programs/pkexec.c
+++ b/src/programs/pkexec.c
@@ -53,6 +53,7 @@
 static gchar *original_user_name = NULL;
 static gchar *original_cwd;
 static gchar *command_line = NULL;
+static gchar *cmdline_short = NULL;
 static struct passwd *pw;
 
 #ifndef HAVE_CLEARENV
@@ -508,6 +509,7 @@ main (int argc, char *argv[])
   path = NULL;
   exec_argv = NULL;
   command_line = NULL;
+  cmdline_short = NULL;
   opt_user = NULL;
   local_agent_handle = NULL;
 
@@ -802,7 +804,6 @@ main (int argc, char *argv[])
   polkit_details_insert (details, "program", path);
   polkit_details_insert (details, "command_line", command_line);
 
-  gchar *cmdline_short = NULL;
   cmdline_short = g_strdup(command_line);
   if (strlen(command_line) > 80)
       g_stpcpy(g_stpcpy( cmdline_short + 38, " ... " ),


More information about the hal-commit mailing list