Fix trace logging initialization
authorGreg Hudson <ghudson@mit.edu>
Thu, 5 Apr 2012 14:07:05 +0000 (14:07 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 5 Apr 2012 14:07:05 +0000 (14:07 +0000)
Reported by stefw@gnome.org.

ticket: 7112

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

src/lib/krb5/krb/init_ctx.c

index 784acbea2ce176d6382384bdb0704caf60f68c11..fdc9218f84e49c6a0d0d23ce4e2a1bfa2a0a088f 100644 (file)
@@ -191,6 +191,7 @@ krb5_init_context_profile(profile_t profile, krb5_flags flags,
     if ((retval = krb5_os_init_context(ctx, profile, flags)) != 0)
         goto cleanup;
 
+    ctx->trace_callback = NULL;
 #ifndef DISABLE_TRACING
     if (!ctx->profile_secure)
         krb5int_init_trace(ctx);
@@ -272,7 +273,6 @@ krb5_init_context_profile(profile_t profile, krb5_flags flags,
     ctx->prompt_types = 0;
     ctx->use_conf_ktypes = 0;
     ctx->udp_pref_limit = -1;
-    ctx->trace_callback = NULL;
     *context_out = ctx;
     return 0;