plug memory leak
authorJohn Kohl <jtkohl@mit.edu>
Wed, 20 Feb 1991 18:15:29 +0000 (18:15 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Wed, 20 Feb 1991 18:15:29 +0000 (18:15 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1746 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/file/fcc_retrv.c
src/lib/krb5/ccache/file/fcc_skip.c
src/lib/krb5/krb/send_tgs.c

index 69c36c125eee2849a87abd68f707a1eb27c1c5c3..d83478ccdf3535b7ed1da6a8f68eead950a9086d 100644 (file)
@@ -2,7 +2,8 @@
  * $Source$
  * $Author$
  *
- * Copyright 1990 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
  *
  * For copying and distribution information, please see the file
  * <krb5/copyright.h>.
@@ -102,7 +103,7 @@ krb5_fcc_retrieve(id, whichfields, mcreds, creds)
          }
 
          /* This one doesn't match */
-         /* XXX krb5_free_credentials(creds); */
+         krb5_free_cred_contents(&fetchcreds);
      }
 
      /* If we get here, a match wasn't found */
index e2fe6410eae7bcf4b95d3ac0b93cb1e6acce9fdf..d21501aebc4b786fe9dbe1c84b424644cd70a551 100644 (file)
@@ -2,7 +2,8 @@
  * $Source$
  * $Author$
  *
- * Copyright 1990 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
  *
  * For copying and distribution information, please see the file
  * <krb5/copyright.h>.
@@ -29,7 +30,7 @@ krb5_fcc_skip_principal(id)
      if (kret != KRB5_OK)
          return kret;
 
-     /* XXX krb5_destroy_principal(&princ); */
+     krb5_free_principal(princ);
      return KRB5_OK;
 }
 
index 164c677dee7d533407d46288f7961d34bc678aef..40ae7f435c04a3c57f35b11ad08a8038c8ab0e41 100644 (file)
@@ -229,6 +229,7 @@ OLDDECLARG(krb5_response *,rep)
        if (!combined_padata) {
            cleanup();
            cleanup_authdata();
+           xfree(ap_req_padata.contents);
            return ENOMEM;
        }
        combined_padata[0] = &ap_req_padata;
@@ -240,6 +241,7 @@ OLDDECLARG(krb5_response *,rep)
        if (!combined_padata) {
            cleanup();
            cleanup_authdata();
+           xfree(ap_req_padata.contents);
            return ENOMEM;
        }
        combined_padata[0] = &ap_req_padata;
@@ -252,12 +254,14 @@ OLDDECLARG(krb5_response *,rep)
        cleanup();
        cleanup_authdata();
        xfree(combined_padata);
+       xfree(ap_req_padata.contents);
        return(retval);
     }
     if (sec_ticket)
        krb5_free_ticket(sec_ticket);
     cleanup_authdata();
     xfree(combined_padata);
+    xfree(ap_req_padata.contents);
 #undef cleanup_authdata
 #undef cleanup
 #define cleanup() {xfree(ap_checksum.contents);}