1
0
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:
Andreas Schneider
2009-04-16 14:58:40 +00:00
parent a092a84139
commit ac38bbc138

View File

@@ -265,6 +265,9 @@ int dh_generate_e(SSH_SESSION *session) {
session->next_crypto->e = bignum_new();
if (session->next_crypto->e == NULL) {
#ifdef HAVE_LIBCRYPTO
bignum_ctx_free(ctx);
#endif
return -1;
}
@@ -295,6 +298,9 @@ int dh_generate_f(SSH_SESSION *session) {
session->next_crypto->f = bignum_new();
if (session->next_crypto->f == NULL) {
#ifdef HAVE_LIBCRYPTO
bignum_ctx_free(ctx);
#endif
return -1;
}