* do_as_req.c (process_as_req): Apply fix from Kevin Coffman to
authorTom Yu <tlyu@mit.edu>
Sun, 6 Oct 2002 01:44:27 +0000 (01:44 +0000)
committerTom Yu <tlyu@mit.edu>
Sun, 6 Oct 2002 01:44:27 +0000 (01:44 +0000)
avoid leaking padata.

ticket: 1206

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

src/kdc/ChangeLog
src/kdc/do_as_req.c

index ba758803fcf597277545c75fd950574337c82995..4823515cc11987a6b4180307fa8daf4e55168e70 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-05  Tom Yu  <tlyu@mit.edu>
+
+       * do_as_req.c (process_as_req): Apply fix from Kevin Coffman to
+       avoid leaking padata.
+
 2002-09-26  Ken Raeburn  <raeburn@mit.edu>
 
        * network.c (struct connection): New field start_time.
index 77a1afd27d4fddfd166491d90cfcc0c403efbedb..e308d1140d301fc46d95e5c38873fcc740afb85b 100644 (file)
@@ -447,7 +447,10 @@ errout:
                                   status);
     }
 
-    krb5_free_keyblock_contents(kdc_context, &encrypting_key);
+    if (encrypting_key.contents)
+       krb5_free_keyblock_contents(kdc_context, &encrypting_key);
+    if (reply.padata)
+       krb5_free_pa_data(kdc_context, reply.padata);
 
     if (cname)
            free(cname);