mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-10 06:23:01 +03:00
Free bignum_ctx in error path.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@507 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -265,6 +265,9 @@ int dh_generate_e(SSH_SESSION *session) {
|
|||||||
|
|
||||||
session->next_crypto->e = bignum_new();
|
session->next_crypto->e = bignum_new();
|
||||||
if (session->next_crypto->e == NULL) {
|
if (session->next_crypto->e == NULL) {
|
||||||
|
#ifdef HAVE_LIBCRYPTO
|
||||||
|
bignum_ctx_free(ctx);
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,6 +298,9 @@ int dh_generate_f(SSH_SESSION *session) {
|
|||||||
|
|
||||||
session->next_crypto->f = bignum_new();
|
session->next_crypto->f = bignum_new();
|
||||||
if (session->next_crypto->f == NULL) {
|
if (session->next_crypto->f == NULL) {
|
||||||
|
#ifdef HAVE_LIBCRYPTO
|
||||||
|
bignum_ctx_free(ctx);
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user