diff options
-rw-r--r-- | kerberosV/src/lib/krb5/fcache.c | 2 | ||||
-rw-r--r-- | kerberosV/src/lib/krb5/v4_glue.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/kerberosV/src/lib/krb5/fcache.c b/kerberosV/src/lib/krb5/fcache.c index 8d1a2db0dd6..1da5f573d68 100644 --- a/kerberosV/src/lib/krb5/fcache.c +++ b/kerberosV/src/lib/krb5/fcache.c @@ -270,8 +270,8 @@ fcc_gen_new(krb5_context context, krb5_ccache *id) fd = mkstemp(file); if(fd < 0) { free(f); - free(file); krb5_set_error_string(context, "mkstemp %s", file); + free(file); return errno; } close(fd); diff --git a/kerberosV/src/lib/krb5/v4_glue.c b/kerberosV/src/lib/krb5/v4_glue.c index d8757518989..50d477c0b2d 100644 --- a/kerberosV/src/lib/krb5/v4_glue.c +++ b/kerberosV/src/lib/krb5/v4_glue.c @@ -155,19 +155,19 @@ write_v4_cc(krb5_context context, const char *tkfile, fd = open(path, O_WRONLY|O_CREAT, 0600); if (fd < 0) { - free(path); krb5_set_error_string(context, "krb5_krb_tf_setup: error opening file %s", path); + free(path); return errno; } if (fstat(fd, &sb) != 0 || !S_ISREG(sb.st_mode)) { - free(path); close(fd); krb5_set_error_string(context, "krb5_krb_tf_setup: tktfile %s is not a file", path); + free(path); return KRB5_FCC_PERM; } @@ -178,11 +178,11 @@ write_v4_cc(krb5_context context, const char *tkfile, break; } if (i == KRB5_TF_LCK_RETRY_COUNT) { - free(path); close(fd); krb5_set_error_string(context, "krb5_krb_tf_setup: failed to lock %s", path); + free(path); return KRB5_FCC_PERM; } @@ -190,11 +190,11 @@ write_v4_cc(krb5_context context, const char *tkfile, ret = ftruncate(fd, 0); if (ret < 0) { flock(fd, LOCK_UN); - free(path); close(fd); krb5_set_error_string(context, "krb5_krb_tf_setup: failed to truncate %s", path); + free(path); return KRB5_FCC_PERM; } } |