summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssh-keygen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index e8e2a2aa0..d81f42cb6 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.310 2018/02/07 05:15:49 jsing Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.311 2018/02/10 05:43:26 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2841,7 +2841,8 @@ passphrase_again:
2841 if ((r = sshkey_write(public, f)) != 0) 2841 if ((r = sshkey_write(public, f)) != 0)
2842 error("write key failed: %s", ssh_err(r)); 2842 error("write key failed: %s", ssh_err(r));
2843 fprintf(f, " %s\n", comment); 2843 fprintf(f, " %s\n", comment);
2844 fclose(f); 2844 if (ferror(f) || fclose(f) != 0)
2845 fatal("write public failed: %s", strerror(errno));
2845 2846
2846 if (!quiet) { 2847 if (!quiet) {
2847 fp = sshkey_fingerprint(public, fingerprint_hash, 2848 fp = sshkey_fingerprint(public, fingerprint_hash,