summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
authormmcc@openbsd.org <mmcc@openbsd.org>2015-12-11 02:31:47 +0000
committerDamien Miller <djm@mindrot.org>2015-12-18 14:49:32 +1100
commit89540b6de025b80404a0cb8418c06377f3f98848 (patch)
treee5ba6b2acbaab9aa3b89c3ff0c0b14adddfa19db /ssh-add.c
parent79394ed6d74572c2d2643d73937dad33727fc240 (diff)
downloadopenssh-git-89540b6de025b80404a0cb8418c06377f3f98848.tar.gz
upstream commit
Remove NULL-checks before sshkey_free(). ok djm@ Upstream-ID: 3e35afe8a25e021216696b5d6cde7f5d2e5e3f52
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ssh-add.c b/ssh-add.c
index cd13d87e..b95841af 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $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
@@ -150,10 +150,8 @@ delete_file(int agent_fd, const char *filename, int key_only)
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);