* adm_conn.c (kadm_get_creds): zero out creds->server after
authorMark Eichin <eichin@mit.edu>
Mon, 2 Oct 1995 19:33:06 +0000 (19:33 +0000)
committerMark Eichin <eichin@mit.edu>
Mon, 2 Oct 1995 19:33:06 +0000 (19:33 +0000)
freeing it to protect later attempts.

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

src/lib/kadm/ChangeLog
src/lib/kadm/adm_conn.c

index 84e1fe9974dcf4a28ff4ebef756e19cc60fa78d5..5299d6a907cf014b84239411811d95120d22583d 100644 (file)
@@ -1,3 +1,8 @@
+Tue Sep 26 02:31:38 1995  Mark Eichin  <eichin@cygnus.com>
+
+       * adm_conn.c (kadm_get_creds): zero out creds->server after
+       freeing it to protect later attempts.
+
 Fri Sep 29 17:06:18 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * logger.c: #ifdef the entire file so it's not built under Windows.
index cb73e8aa2667098c395cf485f6da77a8d86387e7..3b737a0872a0d4e2ca4502dc6344ee975757e0f8 100644 (file)
@@ -283,8 +283,10 @@ kadm_get_creds(kcontext, ccache, client, creds, prompt, oldpw, tlife)
 
  cleanup:
     if (kret) {
-       if (creds->server)
+       if (creds->server) {
            krb5_free_principal(kcontext, creds->server);
+           creds->server = 0;
+       }
     }
     if (my_addresses)
        krb5_free_addresses(kcontext, my_addresses);