diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-08-19 23:19:02 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-08-19 23:19:02 +0000 |
commit | 64c376d590bde21c0d42b662d5c086fdcaaac64f (patch) | |
tree | f1e9a131d6862753526aa64bdc28d51043aab064 /usr.bin | |
parent | 257cb8398a180ee1e5be10c446ccadd47ec594ab (diff) |
fix double-free() in error path of DSA key generation reported by
Mateusz Kocielski; ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sshkey.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c index e6dc3cb1aaa..bfab7b41028 100644 --- a/usr.bin/ssh/sshkey.c +++ b/usr.bin/ssh/sshkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshkey.c,v 1.20 2015/07/03 03:43:18 djm Exp $ */ +/* $OpenBSD: sshkey.c,v 1.21 2015/08/19 23:19:01 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * Copyright (c) 2008 Alexander von Gernler. All rights reserved. @@ -1528,7 +1528,6 @@ dsa_generate_private_key(u_int bits, DSA **dsap) *dsap = NULL; if (!DSA_generate_parameters_ex(private, bits, NULL, 0, NULL, NULL, NULL) || !DSA_generate_key(private)) { - DSA_free(private); ret = SSH_ERR_LIBCRYPTO_ERROR; goto out; } |