Free bignum_ctx in error path.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@507 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
родитель
a092a84139
Коммит
ac38bbc138
@ -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;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user