tty-ask-pw-agent: use right array
authorLennart Poettering <lennart@poettering.net>
Wed, 3 Apr 2019 18:10:19 +0000 (20:10 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 Apr 2019 03:33:25 +0000 (12:33 +0900)
No point in copying the array if we are not going to use the copy.

Prompted by: https://github.com/systemd/systemd/pull/12183#issuecomment-479591781

src/tty-ask-password-agent/tty-ask-password-agent.c

index b5604a7..0a65f4e 100644 (file)
@@ -736,7 +736,7 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char *argv[]) {
                         free_and_replace(*i, k);
                 }
 
-                execv(SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, argv);
+                execv(SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, arguments);
                 _exit(EXIT_FAILURE);
         }