* kdc5_hammer.c (verify_cs_pair): Use krb5_free_creds() instead of
authorEzra Peisach <epeisach@mit.edu>
Sun, 12 Jan 2003 13:03:35 +0000 (13:03 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 12 Jan 2003 13:03:35 +0000 (13:03 +0000)
krb5_free_cred_contents() to cleanup memory leak.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15112 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/hammer/ChangeLog
src/tests/hammer/kdc5_hammer.c

index 00131987b1551f88cb16911d4ba8666482f76fb0..ee30e9ffa3dede8872e4665254c641613ae9bb27 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-12  Ezra Peisach  <epeisach@bu.edu>
+
+       * 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  <raeburn@mit.edu>
 
        * Makefile.in: Revert $(S)=>/ change, for Windows support.
index d8b47fb824a88e23f0993aca7e414911efc53b3d..5fd8d1c51ba52e7c653dd4a3ae3df031864d60bd 100644 (file)
@@ -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;
 }