-/* $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.
*
out:
free(file);
- if (pub != NULL)
- sshkey_free(pub);
+ sshkey_free(pub);
return r;
}
*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;
}
}
r = SSH_ERR_KEY_NOT_FOUND;
out:
- if (pub != NULL)
- sshkey_free(pub);
+ sshkey_free(pub);
fclose(f);
return r;
}
-/* $OpenBSD: ssh-add.c,v 1.126 2015/10/15 23:51:40 djm Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.127 2015/12/11 02:31:47 mmcc Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
certpath, ssh_err(r));
out:
- if (cert != NULL)
- sshkey_free(cert);
- if (public != NULL)
- sshkey_free(public);
+ sshkey_free(cert);
+ sshkey_free(public);
free(certpath);
free(comment);
-/* $OpenBSD: ssh-keygen.c,v 1.285 2015/12/04 16:41:28 markus Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.286 2015/12/11 02:31:47 mmcc Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
close(fd);
sshbuf_free(kbuf);
ssh_krl_free(krl);
- if (ca != NULL)
- sshkey_free(ca);
+ sshkey_free(ca);
}
static void
-/* $OpenBSD: sshconnect2.c,v 1.234 2015/12/11 02:20:28 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.235 2015/12/11 02:31:47 mmcc Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
for (id = TAILQ_FIRST(&authctxt->keys); id;
id = TAILQ_FIRST(&authctxt->keys)) {
TAILQ_REMOVE(&authctxt->keys, id, next);
- if (id->key)
- sshkey_free(id->key);
+ sshkey_free(id->key);
free(id->filename);
free(id);
}
-/* $OpenBSD: sshkey.c,v 1.29 2015/12/10 17:08:40 mmcc Exp $ */
+/* $OpenBSD: sshkey.c,v 1.30 2015/12/11 02:31:47 mmcc Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
for (i = 0; i < cert->nprincipals; i++)
free(cert->principals[i]);
free(cert->principals);
- if (cert->signature_key != NULL)
- sshkey_free(cert->signature_key);
+ sshkey_free(cert->signature_key);
explicit_bzero(cert, sizeof(*cert));
free(cert);
}
out:
if (copy != NULL)
sshbuf_free(copy);
- if (pub != NULL)
- sshkey_free(pub);
+ sshkey_free(pub);
return r;
}
out:
explicit_bzero(&ciphercontext, sizeof(ciphercontext));
free(comment);
- if (prv != NULL)
- sshkey_free(prv);
+ sshkey_free(prv);
if (copy != NULL)
sshbuf_free(copy);
if (decrypted != NULL)
BIO_free(bio);
if (pk != NULL)
EVP_PKEY_free(pk);
- if (prv != NULL)
- sshkey_free(prv);
+ sshkey_free(prv);
return r;
}
#endif /* WITH_OPENSSL */