lib/krb5: krb5_rc_store always fclose(f)

Change-Id: Ibc4864e97e6ada0ef09b0610669eabb1a52f896e
This commit is contained in:
Jeffrey Altman
2022-01-16 19:37:44 -05:00
parent 0a088b9b61
commit 9c27eaa079

View File

@@ -220,8 +220,10 @@ krb5_rc_store(krb5_context context,
}
rk_cloexec_file(f);
count = fread(&tmp, sizeof(ent), 1, f);
if(count != 1)
if (count != 1) {
fclose(f);
return KRB5_RC_IO_UNKNOWN;
}
t = ent.stamp - tmp.stamp;
while(fread(&tmp, sizeof(ent), 1, f)){
if(tmp.stamp < t)