[702] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

kcmd.c, forward.c need to close credential cache when finished with it

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Sun Sep 4 21:14:02 1994

Date: Sun, 4 Sep 1994 21:15:15 -0400
From: "Jonathan I. Kamens" <jik@cam.ov.com>
To: krb5-bugs@MIT.EDU

--- src/appl/bsd/kcmd.c	Fri Aug  5 19:45:20 1994
+++ kcmd.c	Sun Sep  4 21:11:28 1994
@@ -324,6 +324,9 @@
     if (status) goto bad3;
 
     status = krb5_cc_get_principal(cc, &ret_cred->client);
+
+    (void) krb5_cc_close(cc);
+
     if (status) goto bad3;
 
     /* Get ticket from credentials cache or kdc */
--- src/appl/bsd/forward.c	Wed Dec  1 17:38:20 1993
+++ forward.c	Sun Sep  4 21:12:40 1994
@@ -408,10 +408,16 @@
 
     if (retval = krb5_cc_initialize(ccache,
 				    ticket->enc_part2->client)) {
+	(void) krb5_cc_close(ccache);
 	return(retval);
     }
 
     if (retval = krb5_cc_store_cred(ccache, &creds)) {
+	(void) krb5_cc_close(ccache);
+	return(retval);
+    }
+
+    if (retval = krb5_cc_close(ccache)) {
 	return(retval);
     }
 

home help back first fref pref prev next nref lref last post