tty: Fix error return paths and its resource leaks.
* tty/pinentry-tty.c (tty_cmd_handler): Only call do_touch_file on successful interaction. Fix closing file.
- GnuPG-bug-id: T5384
- Co-authored-by: Jakub Jelen <jjelen@redhat.com>
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>