summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2012-12-05 15:42:53 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2012-12-05 15:42:53 +0000
commitc533fca4415fc06dc7bdb437787931eecbc269cc (patch)
treed2e094c033db3845af4c220d04023d2a7853eced /usr.bin
parente6410b01b2722155b881d53ddf0f19b3539b5a2d (diff)
prevent double-free of comment; ok djm@
Diffstat (limited to 'usr.bin')
-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;