diff options
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 23058ee99..e149eda3e 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.249 2014/07/03 03:47:27 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.250 2014/08/21 01:08:52 doug 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 |
@@ -967,12 +967,14 @@ do_gen_all_hostkeys(struct passwd *pw) | |||
967 | f = fdopen(fd, "w"); | 967 | f = fdopen(fd, "w"); |
968 | if (f == NULL) { | 968 | if (f == NULL) { |
969 | printf("fdopen %s failed\n", identity_file); | 969 | printf("fdopen %s failed\n", identity_file); |
970 | close(fd); | ||
970 | key_free(public); | 971 | key_free(public); |
971 | first = 0; | 972 | first = 0; |
972 | continue; | 973 | continue; |
973 | } | 974 | } |
974 | if (!key_write(public, f)) { | 975 | if (!key_write(public, f)) { |
975 | fprintf(stderr, "write key failed\n"); | 976 | fprintf(stderr, "write key failed\n"); |
977 | fclose(f); | ||
976 | key_free(public); | 978 | key_free(public); |
977 | first = 0; | 979 | first = 0; |
978 | continue; | 980 | continue; |