Don't double free the encrypted credential part
authorSam Hartman <hartmans@mit.edu>
Tue, 19 Aug 2003 20:32:43 +0000 (20:32 +0000)
committerSam Hartman <hartmans@mit.edu>
Tue, 19 Aug 2003 20:32:43 +0000 (20:32 +0000)
Ticket: 1731
Tags: pullup

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

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/rd_cred.c

index 80163b8a3c6f8fcfd059dc08903eff69f0307e5d..229336eaf4bb4d575053aa637b6acba4618b17a1 100644 (file)
@@ -1,3 +1,7 @@
+2003-08-19  SamHartman  <hartmans@avalanche-breakdown.mit.edu>
+
+       * rd_cred.c (decrypt_credencdata): Don't double free credentials.
+
 2003-08-08  Tom Yu  <tlyu@mit.edu>
 
        * gic_pwd.c (krb5_get_init_creds_password): If DNS SRV support is
index 0359d40c3c2e9fa041906f76fa4d46ef45b149e4..11be47f0506bc41c5a98b23320a3a2dce3745acb 100644 (file)
@@ -33,15 +33,11 @@ decrypt_credencdata(krb5_context context, krb5_cred *pcred, krb5_keyblock *pkeyb
 
     /*  now decode the decrypted stuff */
     if ((retval = decode_krb5_enc_cred_part(&scratch, &ppart)))
-       goto cleanup_encpart;
+       goto cleanup;
 
     *pcredenc = *ppart;
     retval = 0;
 
-cleanup_encpart:
-    memset(ppart, 0, sizeof(*ppart));
-    krb5_xfree(ppart);
-
 cleanup:
     memset(scratch.data, 0, scratch.length);
     krb5_xfree(scratch.data);