* kprop.c: The credentials cache should be destroyed after any error
authorRichard Basch <probe@mit.edu>
Wed, 6 Mar 1996 21:41:22 +0000 (21:41 +0000)
committerRichard Basch <probe@mit.edu>
Wed, 6 Mar 1996 21:41:22 +0000 (21:41 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7598 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/ChangeLog
src/slave/kprop.c

index fe6c8bacfffdcad39d6e4a8f3d90a8e9b83d65d6..179178171b25f119915c2f6165e56a700da23193 100644 (file)
@@ -1,3 +1,7 @@
+Wed Mar  6 16:15:46 1996  Richard Basch  <basch@lehman.com>
+
+       * kprop.c: The credentials cache should be destroyed after any error.
+
 Tue Mar  5 12:20:00 1996  Richard Basch  <basch@lehman.com>
 
        * kprop.c: Call krb5_sname_to_principal rather than doing the OS
index 3166dfffe27b0e840bafc4768f7a6089abae9377..9f8a2877213eec66858052d963a19a351424f126 100644 (file)
@@ -255,6 +255,7 @@ void get_tickets(context)
                                         KRB5_NT_SRV_HST, &creds.server);
        if (retval) {
            com_err(progname, errno, "while setting server principal name");
+           (void) krb5_cc_destroy(context, ccache);
            exit(1);
        }
        if (realm) {
@@ -268,11 +269,13 @@ void get_tickets(context)
         */
        if (retval = krb5_copy_principal(context, my_principal, &creds.client)) {
                com_err(progname, retval, "While copying client principal");
+               (void) krb5_cc_destroy(context, ccache);
                exit(1);
        }
        if (srvtab) {
                if (retval = krb5_kt_resolve(context, srvtab, &keytab)) {
                        com_err(progname, retval, "while resolving keytab");
+                       (void) krb5_cc_destroy(context, ccache);
                        exit(1);
                }
        }
@@ -281,6 +284,7 @@ void get_tickets(context)
                                             NULL, keytab, ccache, &creds, 0);
        if (retval) {
                com_err(progname, retval, "while getting initial ticket\n");
+               (void) krb5_cc_destroy(context, ccache);
                exit(1);
        }
        /*