In krb5_get_in_tkt, r7002 introduced an unused local variable
authorGreg Hudson <ghudson@mit.edu>
Fri, 10 Apr 2009 21:17:03 +0000 (21:17 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 10 Apr 2009 21:17:03 +0000 (21:17 +0000)
"padata".  It was accidentally used in r18641 instead of
preauth_to_use when sorting the received padata sequence, causing the
sort to be a no-op.  Sort the correct sequence and eliminate the
unused local variable.

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

src/lib/krb5/krb/get_in_tkt.c

index e6c4434c299c7d36644ecb25785a53beeaaa738b..5acc19aa569c60887c28f27688146a54a3e7bada 100644 (file)
@@ -512,7 +512,6 @@ krb5_get_in_tkt(krb5_context context,
     krb5_keyblock *    decrypt_key = 0;
     krb5_kdc_req       request;
     krb5_data *encoded_request;
-    krb5_pa_data       **padata = 0;
     krb5_error *       err_reply;
     krb5_kdc_rep *     as_reply = 0;
     krb5_pa_data  **   preauth_to_use = 0;
@@ -664,7 +663,7 @@ krb5_get_in_tkt(krb5_context context,
                    goto cleanup;
                 retval = sort_krb5_padata_sequence(context,
                                                   &request.server->realm,
-                                                  padata);
+                                                  preauth_to_use);
                if (retval)
                    goto cleanup;
                continue;
@@ -728,8 +727,6 @@ cleanup:
        krb5_free_addresses(context, request.addresses);
     if (request.padata)
        krb5_free_pa_data(context, request.padata);
-    if (padata)
-       krb5_free_pa_data(context, padata);
     if (preauth_to_use)
        krb5_free_pa_data(context, preauth_to_use);
     if (decrypt_key)