diff options
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r-- | auth2-pubkey.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c index e64982283..8fb7ffe71 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-pubkey.c,v 1.75 2018/01/23 05:27:21 djm Exp $ */ | 1 | /* $OpenBSD: auth2-pubkey.c,v 1.76 2018/02/07 22:52:45 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -471,8 +471,7 @@ check_authkeys_file(FILE *f, char *file, struct sshkey *key, struct passwd *pw) | |||
471 | /* Always consume entire file */ | 471 | /* Always consume entire file */ |
472 | if (found_key) | 472 | if (found_key) |
473 | continue; | 473 | continue; |
474 | if (found != NULL) | 474 | sshkey_free(found); |
475 | sshkey_free(found); | ||
476 | found = sshkey_new(sshkey_is_cert(key) ? KEY_UNSPEC : key->type); | 475 | found = sshkey_new(sshkey_is_cert(key) ? KEY_UNSPEC : key->type); |
477 | if (found == NULL) | 476 | if (found == NULL) |
478 | goto done; | 477 | goto done; |
@@ -563,8 +562,7 @@ check_authkeys_file(FILE *f, char *file, struct sshkey *key, struct passwd *pw) | |||
563 | } | 562 | } |
564 | } | 563 | } |
565 | done: | 564 | done: |
566 | if (found != NULL) | 565 | sshkey_free(found); |
567 | sshkey_free(found); | ||
568 | if (!found_key) | 566 | if (!found_key) |
569 | debug2("key not found"); | 567 | debug2("key not found"); |
570 | return found_key; | 568 | return found_key; |