diff options
author | Nikos <nmav@crystal.(none)> | 2008-02-17 00:18:08 +0200 |
---|---|---|
committer | Nikos <nmav@crystal.(none)> | 2008-02-17 00:24:15 +0200 |
commit | 5f1193a1f9e789cfc78adf9c81bd9f4c7223445f (patch) | |
tree | 50830434bc0b6ba35b32d3ae183ed83e1134121a /lib/gnutls_auth.c | |
parent | 72a01a895e9f6ce92df09352961ca7ba8f8c946b (diff) | |
download | gnutls-5f1193a1f9e789cfc78adf9c81bd9f4c7223445f.tar.gz |
Corrected memory leaks in session resuming and DHE ciphersuites. Reported
by Daniel Stenberg.
Diffstat (limited to 'lib/gnutls_auth.c')
-rw-r--r-- | lib/gnutls_auth.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gnutls_auth.c b/lib/gnutls_auth.c index 040bf04518..fada7f3d4a 100644 --- a/lib/gnutls_auth.c +++ b/lib/gnutls_auth.c @@ -394,14 +394,17 @@ _gnutls_auth_info_set (gnutls_session_t session, */ if (gnutls_auth_get_type (session) != session->key->auth_info_type) { + + _gnutls_free_auth_info (session); + session->key->auth_info = - gnutls_realloc_fast (session->key->auth_info, size); + calloc( 1, size); if (session->key->auth_info == NULL) { gnutls_assert (); return GNUTLS_E_MEMORY_ERROR; } - memset (session->key->auth_info, 0, size); + session->key->auth_info_type = type; session->key->auth_info_size = size; } |