upstream commit
fix double-free() in error path of DSA key generation reported by Mateusz Kocielski; ok markus@ Upstream-ID: 4735d8f888b10599a935fa1b374787089116713c
This commit is contained in:
parent
45b0eb752c
commit
ec6eda16eb
3
sshkey.c
3
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) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
|
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
|
||||||
|
@ -1556,7 +1556,6 @@ dsa_generate_private_key(u_int bits, DSA **dsap)
|
||||||
*dsap = NULL;
|
*dsap = NULL;
|
||||||
if (!DSA_generate_parameters_ex(private, bits, NULL, 0, NULL,
|
if (!DSA_generate_parameters_ex(private, bits, NULL, 0, NULL,
|
||||||
NULL, NULL) || !DSA_generate_key(private)) {
|
NULL, NULL) || !DSA_generate_key(private)) {
|
||||||
DSA_free(private);
|
|
||||||
ret = SSH_ERR_LIBCRYPTO_ERROR;
|
ret = SSH_ERR_LIBCRYPTO_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue