summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-add.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2012-12-05 15:42:52 +0000
committermarkus <markus@openbsd.org>2012-12-05 15:42:52 +0000
commit8a82c8e09723223419c73f36e1b2d27f1f65174d (patch)
tree7b0f7b1197ab18f4c21f5658723daecf577989c8 /usr.bin/ssh/ssh-add.c
parentminor cleanup, whitespaces, mostly synced with freebsd (diff)
downloadwireguard-openbsd-8a82c8e09723223419c73f36e1b2d27f1f65174d.tar.xz
wireguard-openbsd-8a82c8e09723223419c73f36e1b2d27f1f65174d.zip
prevent double-free of comment; ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r--usr.bin/ssh/ssh-add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index 4045efc0297..6c70f4e2649 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.104 2012/12/02 20:42:15 djm Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.105 2012/12/05 15:42:52 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -112,6 +112,7 @@ delete_file(AuthenticationConnection *ac, const char *filename, int key_only)
/* Now try to delete the corresponding certificate too */
free(comment);
+ comment = NULL;
xasprintf(&certpath, "%s-cert.pub", filename);
if ((cert = key_load_public(certpath, &comment)) == NULL)
goto out;