From: Ezra Peisach Date: Sun, 12 Jan 2003 13:03:35 +0000 (+0000) Subject: * kdc5_hammer.c (verify_cs_pair): Use krb5_free_creds() instead of X-Git-Tag: krb5-1.3-alpha1~165 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa34c8a95343b6163619ec8cdb8330cd9b049a09;p=krb5.git * kdc5_hammer.c (verify_cs_pair): Use krb5_free_creds() instead of krb5_free_cred_contents() to cleanup memory leak. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15112 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/hammer/ChangeLog b/src/tests/hammer/ChangeLog index 00131987b..ee30e9ffa 100644 --- a/src/tests/hammer/ChangeLog +++ b/src/tests/hammer/ChangeLog @@ -1,3 +1,8 @@ +2003-01-12 Ezra Peisach + + * kdc5_hammer.c (verify_cs_pair): Use krb5_free_creds() instead of + krb5_free_cred_contents() to cleanup memory leak. + 2002-08-29 Ken Raeburn * Makefile.in: Revert $(S)=>/ change, for Windows support. diff --git a/src/tests/hammer/kdc5_hammer.c b/src/tests/hammer/kdc5_hammer.c index d8b47fb82..5fd8d1c51 100644 --- a/src/tests/hammer/kdc5_hammer.c +++ b/src/tests/hammer/kdc5_hammer.c @@ -324,7 +324,7 @@ int verify_cs_pair(context, p_client_str, p_client, service, hostname, { krb5_error_code retval; krb5_creds creds; - krb5_creds * credsp; + krb5_creds * credsp = NULL; krb5_ticket * ticket = NULL; krb5_keyblock * keyblock = NULL; krb5_auth_context auth_context = NULL; @@ -440,7 +440,7 @@ cleanup_keyblock: cleanup_rdata: krb5_free_data_contents(context, &request_data); - krb5_free_cred_contents(context, credsp); + if(credsp ) krb5_free_creds(context, credsp); return retval; }