From 363f5a690d6dc32edb8f38a2c241edbf3c2e9dda Mon Sep 17 00:00:00 2001 From: James Housley Date: Fri, 15 Jun 2007 10:07:49 +0000 Subject: [PATCH] Another bug pointed out by Troy Gutjahr. The free and nulling for two pointers were crossed --- src/kex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kex.c b/src/kex.c index 5e8d75d..75f758d 100644 --- a/src/kex.c +++ b/src/kex.c @@ -758,9 +758,9 @@ libssh2_kex_method_diffie_hellman_group_exchange_sha1_key_exchange(LIBSSH2_SESSI dh_gex_clean_exit: key_state->state = libssh2_NB_state_idle; _libssh2_bn_free(key_state->g); - key_state->p = NULL; - _libssh2_bn_free(key_state->p); key_state->g = NULL; + _libssh2_bn_free(key_state->p); + key_state->p = NULL; return ret; }