summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>2021-11-25 21:42:12 +0000
committerSigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>2021-11-25 21:42:12 +0000
commitadd3a0a4da2f46f69a87782699e77c794a8b2cb9 (patch)
tree036fee78345028c49032a13ca0fe099856a2e75a
parente2a8d3493ab0fdc345b6513a53f30f2b4f36ed97 (diff)
aescbc: flush before exit and report an error (if any)
-rw-r--r--sys/src/cmd/auth/secstore/aescbc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/auth/secstore/aescbc.c b/sys/src/cmd/auth/secstore/aescbc.c
index 148339e5c..ffa8b38d1 100644
--- a/sys/src/cmd/auth/secstore/aescbc.c
+++ b/sys/src/cmd/auth/secstore/aescbc.c
@@ -146,6 +146,8 @@ main(int argc, char **argv)
sysfatal("decrypted file failed to authenticate");
}
}
- exits("");
+ if(Bflush(&bout) != 0)
+ sysfatal("write: %r");
+ exits(nil);
return 1; /* keep other compilers happy */
}