diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-12-11 03:31:47 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-18 04:49:32 +0100 |
commit | 89540b6de025b80404a0cb8418c06377f3f98848 (patch) | |
tree | e5ba6b2acbaab9aa3b89c3ff0c0b14adddfa19db /authfile.c | |
parent | upstream commit (diff) | |
download | openssh-89540b6de025b80404a0cb8418c06377f3f98848.tar.xz openssh-89540b6de025b80404a0cb8418c06377f3f98848.zip |
upstream commit
Remove NULL-checks before sshkey_free().
ok djm@
Upstream-ID: 3e35afe8a25e021216696b5d6cde7f5d2e5e3f52
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/authfile.c b/authfile.c index 668df7d9e..9cd490ca3 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.118 2015/12/10 17:08:40 mmcc Exp $ */ +/* $OpenBSD: authfile.c,v 1.119 2015/12/11 02:31:47 mmcc Exp $ */ /* * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. * @@ -427,8 +427,7 @@ sshkey_load_cert(const char *filename, struct sshkey **keyp) out: free(file); - if (pub != NULL) - sshkey_free(pub); + sshkey_free(pub); return r; } @@ -473,10 +472,8 @@ sshkey_load_private_cert(int type, const char *filename, const char *passphrase, *keyp = key; key = NULL; out: - if (key != NULL) - sshkey_free(key); - if (cert != NULL) - sshkey_free(cert); + sshkey_free(key); + sshkey_free(cert); return r; } @@ -537,8 +534,7 @@ sshkey_in_file(struct sshkey *key, const char *filename, int strict_type, } r = SSH_ERR_KEY_NOT_FOUND; out: - if (pub != NULL) - sshkey_free(pub); + sshkey_free(pub); fclose(f); return r; } |