Skip to content

Commit 56a05ff

Browse files
hyperfinitismJuergenReppSIT
authored andcommitted
fix(tpm2_send): avoid unintended stdio closing in close_file()
Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>
1 parent c0f8d04 commit 56a05ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/tpm2_send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static FILE *open_file(const char *path, const char *mode) {
111111

112112
static void close_file(FILE *f) {
113113

114-
if (f && (f != stdin || f != stdout)) {
114+
if (f && f != stdin && f != stdout) {
115115
fclose(f);
116116
}
117117
}

0 commit comments

Comments
 (0)