diff --git a/lib/krb5/log.c b/lib/krb5/log.c index 961a63623..ff9d8eb4a 100644 --- a/lib/krb5/log.c +++ b/lib/krb5/log.c @@ -221,8 +221,10 @@ log_file(const char *timestr, if(f->fd == NULL) return; fprintf(f->fd, "%s %s\n", timestr, msg); - if(f->keep_open == 0) + if(f->keep_open == 0) { fclose(f->fd); + f->fd = NULL; + } } static void