]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
plug a memory leak
authorMarc Horowitz <marc@mit.edu>
Tue, 6 Oct 1998 07:36:51 +0000 (07:36 +0000)
committerMarc Horowitz <marc@mit.edu>
Tue, 6 Oct 1998 07:36:51 +0000 (07:36 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10967 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/preauth.c

index 023a38ea9d7c6342b53669b795e03e143d5ccbb0..ab1432fdb02314624452508f89227ee679e6c47c 100644 (file)
@@ -160,6 +160,10 @@ krb5_error_code krb5_obtain_padata(context, preauth_to_use, key_proc,
 
     for (pa = preauth_to_use, size=0; *pa; pa++, size++) {
        if ((*pa)->pa_type == KRB5_PADATA_ETYPE_INFO) {
+           /* XXX use the first one.  Is there another way to disambiguate? */
+           if (etype_info)
+               continue;
+
            scratch.length = (*pa)->length;
            scratch.data = (char *) (*pa)->contents;
            retval = decode_krb5_etype_info(&scratch, &etype_info);
@@ -219,6 +223,8 @@ krb5_error_code krb5_obtain_padata(context, preauth_to_use, key_proc,
     }
 
 cleanup:
+    if (etype_info)
+       krb5_free_etype_info(context, etype_info);
     if (f_salt)
        krb5_xfree(salt.data);
     if (send_pa_list)