diff options
Diffstat (limited to 'lib/gnutls_anon_cred.c')
-rw-r--r-- | lib/gnutls_anon_cred.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gnutls_anon_cred.c b/lib/gnutls_anon_cred.c index 379d821b23..544596d646 100644 --- a/lib/gnutls_anon_cred.c +++ b/lib/gnutls_anon_cred.c @@ -37,7 +37,8 @@ static int anon_tmp; * the structure. **/ void gnutls_anon_free_server_sc( GNUTLS_ANON_SERVER_CREDENTIALS sc) { - return; + + gnutls_free( sc); } /** @@ -49,7 +50,10 @@ void gnutls_anon_free_server_sc( GNUTLS_ANON_SERVER_CREDENTIALS sc) { * the structure. **/ int gnutls_anon_allocate_server_sc( GNUTLS_ANON_SERVER_CREDENTIALS *sc) { - *sc = &anon_tmp; + + *sc = gnutls_calloc( 1, sizeof(ANON_SERVER_CREDENTIALS_INT)); + (*sc)->dh_params = &_gnutls_dh_default_params; + return 0; } |