* keytab.c (krb5_ktkdb_get_entry): Don't use local variable "context" until
authorKen Raeburn <raeburn@mit.edu>
Sat, 3 Apr 2004 01:23:51 +0000 (01:23 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 3 Apr 2004 01:23:51 +0000 (01:23 +0000)
after it's been set.

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

src/lib/kdb/ChangeLog
src/lib/kdb/keytab.c

index 49ae47865c3938febb9205a4eb640a64a715870a..84bc49e459af6c85c2e6d9b0b777df5f57ba2002 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-02  Ken Raeburn  <raeburn@mit.edu>
+
+       * keytab.c (krb5_ktkdb_get_entry): Don't use local variable
+       "context" until after it's been set.
+
 2003-12-13  Ken Raeburn  <raeburn@mit.edu>
 
        * keytab.c (krb5_ktkdb_get_name): New function.
index 4d5894d088cf7282b2f62848079bcc8241965107..77215f4109a48fe6f333ba9260f0a5cf21a7fd71 100644 (file)
@@ -130,7 +130,7 @@ krb5_ktkdb_get_entry(in_context, id, principal, kvno, enctype, entry)
     krb5_db_entry        db_entry;
     krb5_boolean         more = 0;
     int                  n = 0;
-    int xrealm_tgt = is_xrealm_tgt(context, principal);
+    int xrealm_tgt;
     int similar;
 
     if (ktkdb_ctx)
@@ -138,6 +138,8 @@ krb5_ktkdb_get_entry(in_context, id, principal, kvno, enctype, entry)
     else
        context = in_context;
 
+    xrealm_tgt = is_xrealm_tgt(context, principal);
+
     /* Open database */
     /* krb5_db_init(context); */
     if ((kerror = krb5_db_open_database(context)))