diff --git a/daemon/logger/loggerutils/logfile.go b/daemon/logger/loggerutils/logfile.go index 7282601b1d..0ee196e186 100644 --- a/daemon/logger/loggerutils/logfile.go +++ b/daemon/logger/loggerutils/logfile.go @@ -371,7 +371,7 @@ func (w *LogFile) Close() error { close(w.closed) // Wait until any in-progress rotation is complete. w.rotateMu.Lock() - w.rotateMu.Unlock() //nolint:staticcheck,gocritic + defer w.rotateMu.Unlock() return nil }