diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index cb2e78b7f70f..d06db4d00650 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -683,6 +683,7 @@ pmclog_configure_log(struct pmc_mdep *md, struct pmc_owner *po, int logfd) (void) fdrop(po->po_file, curthread); po->po_file = NULL; /* clear file and error state */ po->po_error = 0; + po->po_flags &= ~PMC_PO_OWNS_LOGFILE; return (error); }