diff options
Diffstat (limited to 'sshkey.c')
-rw-r--r-- | sshkey.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshkey.c,v 1.23 2015/09/13 14:39:16 tim Exp $ */ | 1 | /* $OpenBSD: sshkey.c,v 1.24 2015/10/15 23:08:23 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2008 Alexander von Gernler. All rights reserved. | 4 | * Copyright (c) 2008 Alexander von Gernler. All rights reserved. |
@@ -1758,9 +1758,7 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp) | |||
1758 | struct sshkey *n = NULL; | 1758 | struct sshkey *n = NULL; |
1759 | int ret = SSH_ERR_INTERNAL_ERROR; | 1759 | int ret = SSH_ERR_INTERNAL_ERROR; |
1760 | 1760 | ||
1761 | if (pkp != NULL) | 1761 | *pkp = NULL; |
1762 | *pkp = NULL; | ||
1763 | |||
1764 | switch (k->type) { | 1762 | switch (k->type) { |
1765 | #ifdef WITH_OPENSSL | 1763 | #ifdef WITH_OPENSSL |
1766 | case KEY_DSA: | 1764 | case KEY_DSA: |
@@ -2243,9 +2241,7 @@ sshkey_demote(const struct sshkey *k, struct sshkey **dkp) | |||
2243 | struct sshkey *pk; | 2241 | struct sshkey *pk; |
2244 | int ret = SSH_ERR_INTERNAL_ERROR; | 2242 | int ret = SSH_ERR_INTERNAL_ERROR; |
2245 | 2243 | ||
2246 | if (dkp != NULL) | 2244 | *dkp = NULL; |
2247 | *dkp = NULL; | ||
2248 | |||
2249 | if ((pk = calloc(1, sizeof(*pk))) == NULL) | 2245 | if ((pk = calloc(1, sizeof(*pk))) == NULL) |
2250 | return SSH_ERR_ALLOC_FAIL; | 2246 | return SSH_ERR_ALLOC_FAIL; |
2251 | pk->type = k->type; | 2247 | pk->type = k->type; |