diff --git a/lib/krb5/replay.c b/lib/krb5/replay.c index d9c442bb2..2fec8afd1 100644 --- a/lib/krb5/replay.c +++ b/lib/krb5/replay.c @@ -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)