Skip to content

Commit a4fd6cd

Browse files
committed
tty-ask-pw-agent: properly propagate error
1 parent 66bff73 commit a4fd6cd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ static int agent_ask_password_tty(
143143
const char *flag_file,
144144
char ***ret) {
145145

146-
int tty_fd = -1;
147-
int r;
146+
int tty_fd = -1, r;
148147

149148
if (arg_console) {
150149
const char *con = arg_device ?: "/dev/console";
@@ -166,7 +165,7 @@ static int agent_ask_password_tty(
166165
release_terminal();
167166
}
168167

169-
return 0;
168+
return r;
170169
}
171170

172171
static int process_one_password_file(const char *filename) {

0 commit comments

Comments
 (0)