Fix memory leak --- the default encryption types was not being freed
authorTheodore Tso <tytso@mit.edu>
Tue, 14 Feb 1995 04:34:35 +0000 (04:34 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 14 Feb 1995 04:34:35 +0000 (04:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4944 dc483132-0cff-0310-8789-dd5450dbe970

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

index bed2ba7b6c33381113acea4854d32e80b7159a8b..9eaf91de8aa4c001f2ec21b0801e966cc3b92106 100644 (file)
@@ -1,3 +1,8 @@
+Mon Feb 13 20:25:20 1995  Theodore Y. Ts'o  (tytso@dcl)
+
+       * get_in_tkt.c (krb5_get_in_tkt): Fix memory leak --- the default
+               encryption types was not being freed.
+
 Fri Feb 10 15:45:59 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * rd_req.c (krb5_rd_req): Remove ISODE cruft.
index 8275fa27f1e3f59fd86a8e077111bb6a20332b83..0e72579da24c142d3f3732609b2d989ef00b5fd6 100644 (file)
@@ -179,8 +179,11 @@ krb5_get_in_tkt(context, options, addrs, etypes, ptypes, key_proc, keyseed,
     request.second_ticket = 0;
 
     /* encode & send to KDC */
-    if (retval = encode_krb5_as_req(&request, &packet))
-       goto cleanup;
+    retval = encode_krb5_as_req(&request, &packet);
+    if (!etypes)
+      free(request.etype);
+    if (retval)
+      goto cleanup;
 
     k4_version = packet->data[0];
     retval = krb5_sendto_kdc(context, packet,