Fixed a bug where getting addressless tickets would cause kim
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 30 Sep 2008 05:11:58 +0000 (05:11 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 30 Sep 2008 05:11:58 +0000 (05:11 +0000)
to pass a NULL krb5_context into krb5_os_localaddr

ticket: 6055

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

src/kim/lib/kim_options.c

index 89272b6358afaa2750bf51e7d6064836cdd8c097..d97b3469900c9e23b02ee5d59a90916336725933 100644 (file)
@@ -454,17 +454,17 @@ krb5_get_init_creds_opt *kim_options_init_cred_options (kim_options in_options)
     
     if (!err && !in_options) { err = check_error (KIM_NULL_PARAMETER_ERR); }
     
+    if (!err && !in_options->init_cred_context) {
+        err = krb5_error (NULL,
+                          krb5_init_context (&in_options->init_cred_context));
+    }
+    
     if (!err && !in_options->addressless) {
         err = krb5_error (in_options->init_cred_context, 
                           krb5_os_localaddr (in_options->init_cred_context, 
                                              &addresses));
     }
     
-    if (!err && !in_options->init_cred_context) {
-        err = krb5_error (NULL,
-                          krb5_init_context (&in_options->init_cred_context));
-    }
-    
     if (!err && !in_options->init_cred_options) {
         err = krb5_error (in_options->init_cred_context,
                           krb5_get_init_creds_opt_alloc (in_options->init_cred_context,