fix possible uninit variable use in error path
authorKen Raeburn <raeburn@mit.edu>
Fri, 25 Jul 2008 19:19:06 +0000 (19:19 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 25 Jul 2008 19:19:06 +0000 (19:19 +0000)
Clear gss_client and gss_target before any possible branch to 'error',
where they can be used.

ticket: new
target_version: 1.6.4
tags: pullup

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

src/lib/kadm5/clnt/client_init.c

index d5131cfdad960ed907fb00aa0fb7135c89a24815..67a99e7fd9a61db11a9cde45e467bb2a3d976754 100644 (file)
@@ -605,6 +605,7 @@ kadm5_setup_gss(kadm5_server_handle_t handle,
      code = KADM5_GSS_ERROR;
      gss_client_creds = GSS_C_NO_CREDENTIAL;
      ccname_orig = NULL;
+     gss_client = gss_target = GSS_C_NO_NAME;
 
      /* Temporarily use the kadm5 cache. */
      gssstat = gss_krb5_ccache_name(&minor_stat, handle->cache_name,