diff options
Diffstat (limited to 'src/ask-password-api.c')
-rw-r--r-- | src/ask-password-api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ask-password-api.c b/src/ask-password-api.c index f43075e601..dd54fb6abf 100644 --- a/src/ask-password-api.c +++ b/src/ask-password-api.c @@ -180,7 +180,6 @@ int ask_password_tty( } if (ttyfd >= 0) - loop_write(ttyfd, "\n", 1, false); passphrase[p] = 0; @@ -196,8 +195,11 @@ finish: close_nointr_nofail(notify); if (ttyfd >= 0) { - if (reset_tty) + + if (reset_tty) { + loop_write(ttyfd, "\n", 1, false); tcsetattr(ttyfd, TCSADRAIN, &old_termios); + } close_nointr_nofail(ttyfd); } |