123456789101112131415161718192021222324252627 |
- Subject: Fix minor FILE* leak
- Origin: v10-1-g198f720 <https://github.com/latchset/jose/commit/v10-1-g198f720>
- Upstream-Author: Nathaniel McCallum <npmccallum@redhat.com>
- Date: Fri Sep 29 14:49:57 2017 -0400
- --- a/cmd/jwe/pwd.h
- +++ b/cmd/jwe/pwd.h
- @@ -57,8 +57,10 @@
- nf.c_lflag &= ~ECHO;
- nf.c_lflag |= ECHONL;
-
- - if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
- + if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
- + fclose(tty);
- return NULL;
- + }
-
- fprintf(tty, "%s", prompt);
-
- @@ -72,6 +74,7 @@
- }
-
- tcsetattr(fileno(tty), TCSANOW, &of);
- + fclose(tty);
- return pwd;
- }
- #endif
|