Fixed one more corner case in tty pinentry

This commit is contained in:
Jakub Jelen 2021-04-15 11:44:38 +02:00
parent a0c1393e4c
commit d731926be1

View File

@ -130,3 +130,13 @@ index 4a2b67f..63e306f 100644
{
if (terminal_setup (fileno (ttyfi), !!pinentry->pin) == -1)
{
@@ -583,7 +583,8 @@ tty_cmd_handler (pinentry_t pinentry)
if (pinentry->ttyname)
{
fclose (ttyfi);
- fclose (ttyfo);
+ if (ttyfo)
+ fclose (ttyfo);
}
return rc;