pull up r19007 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 22 Dec 2006 01:21:33 +0000 (01:21 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 22 Dec 2006 01:21:33 +0000 (01:21 +0000)
 r19007@cathode-dark-space:  tlyu | 2006-12-21 20:19:55 -0500
 ticket: 5123

  * src/lib/krb5/krb/get_in_tkt.c (krb5_get_init_creds): Fix
  ordering bug in previous patch.

ticket: 5123

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19008 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/get_in_tkt.c

index 8470724ea4a1e0e4a9610d2897daa50e1315f623..12476d3fab1a4b6bae7ba7fe5a6ae67673317cbc 100644 (file)
@@ -1134,13 +1134,14 @@ krb5_get_init_creds(krb5_context context,
                /* No preauth supplied, so can't query the plug-ins. */
                ret = KRB5KRB_ERR_GENERIC;
            }
-           krb5_free_error(context, err_reply);
-           err_reply = NULL;
            if (ret) {
                /* couldn't come up with anything better */
                ret = err_reply->error + ERROR_TABLE_BASE_krb5;
-               goto cleanup;
            }
+           krb5_free_error(context, err_reply);
+           err_reply = NULL;
+           if (ret)
+               goto cleanup;
        }
 
         if (encoded_previous_request != NULL) {