* rd_req_dec.c (krb5_rd_req_decrypt_tkt_part): Fix memory leak if
authorEzra Peisach <epeisach@mit.edu>
Wed, 4 Oct 2000 18:09:59 +0000 (18:09 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 4 Oct 2000 18:09:59 +0000 (18:09 +0000)
krb5_decrypt_tkt_part() fails. (krb5-libs/855)

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

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

index 62d67fea027a3a2103ac1605f5a9c484ccdcd646..4221c736aacb045683f1686a0f7a828c9744283c 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-04  Ezra Peisach  <epeisach@mit.edu>
+
+       * rd_req_dec.c (krb5_rd_req_decrypt_tkt_part): Fix memory leak if
+       krb5_decrypt_tkt_part() fails. (krb5-libs/855)
+
 2000-10-03  Ezra Peisach  <epeisach@mit.edu>
 
        * copy_addrs.c (krb5_copy_addresses): Cleanup unsigned vs signed
index 442e78b2d836a3f37d6898b31bf08c92b47b50f2..4a799fc6563978d2769a4672cca5edcb42dc2a60 100644 (file)
@@ -83,8 +83,8 @@ krb5_rd_req_decrypt_tkt_part(context, req, keytab)
                                    enctype, &ktent)))
        return retval;
 
-    if ((retval = krb5_decrypt_tkt_part(context, &ktent.key, req->ticket)))
-       return retval;
+    retval = krb5_decrypt_tkt_part(context, &ktent.key, req->ticket);
+    /* If error, we will return after freeing memory */
 
     (void) krb5_kt_free_entry(context, &ktent);
     return retval;