lib/krb5/fcache.c: couple of uses of errno after it may have been changed.
This commit is contained in:

committed by
Jeffrey Altman

parent
59732ce753
commit
a730c89376
@@ -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 */
|
||||
|
Reference in New Issue
Block a user