diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-12-11 02:31:47 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-18 14:49:32 +1100 |
commit | 89540b6de025b80404a0cb8418c06377f3f98848 (patch) | |
tree | e5ba6b2acbaab9aa3b89c3ff0c0b14adddfa19db /ssh-add.c | |
parent | 79394ed6d74572c2d2643d73937dad33727fc240 (diff) |
upstream commit
Remove NULL-checks before sshkey_free().
ok djm@
Upstream-ID: 3e35afe8a25e021216696b5d6cde7f5d2e5e3f52
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.126 2015/10/15 23:51:40 djm Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.127 2015/12/11 02:31:47 mmcc Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -150,10 +150,8 @@ delete_file(int agent_fd, const char *filename, int key_only) | |||
150 | certpath, ssh_err(r)); | 150 | certpath, ssh_err(r)); |
151 | 151 | ||
152 | out: | 152 | out: |
153 | if (cert != NULL) | 153 | sshkey_free(cert); |
154 | sshkey_free(cert); | 154 | sshkey_free(public); |
155 | if (public != NULL) | ||
156 | sshkey_free(public); | ||
157 | free(certpath); | 155 | free(certpath); |
158 | free(comment); | 156 | free(comment); |
159 | 157 | ||