Skip to content

Commit

Permalink
lib/krb5/fcache.c: couple of uses of errno after it may have been cha…
Browse files Browse the repository at this point in the history
…nged.
  • Loading branch information
Roland C. Dowdeswell authored and jaltman committed Nov 8, 2016
1 parent 59732ce commit a730c89
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/krb5/fcache.c
Expand Up @@ -275,18 +275,20 @@ _krb5_erase_file(krb5_context context, const char *filename)
return ret;
}
if (unlink(filename) < 0) {
ret = errno;
_krb5_xunlock(context, fd);
close (fd);
krb5_set_error_message(context, errno,
N_("krb5_cc_destroy: unlinking \"%s\": %s", ""),
filename, strerror(errno));
return errno;
filename, strerror(ret));
return ret;
}
ret = fstat(fd, &sb2);
if (ret < 0) {
ret = errno;
_krb5_xunlock(context, fd);
close (fd);
return errno;
return ret;
}

/* check if someone was playing with symlinks */
Expand Down

0 comments on commit a730c89

Please sign in to comment.