From 8a82c8e09723223419c73f36e1b2d27f1f65174d Mon Sep 17 00:00:00 2001 From: markus Date: Wed, 5 Dec 2012 15:42:52 +0000 Subject: prevent double-free of comment; ok djm@ --- usr.bin/ssh/ssh-add.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/ssh/ssh-add.c') 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 * Copyright (c) 1995 Tatu Ylonen , 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; -- cgit v1.2.3-59-g8ed1b