diff --git a/rule/function-length.go b/rule/function-length.go index 341a6a027..f7ab8b98e 100644 --- a/rule/function-length.go +++ b/rule/function-length.go @@ -19,7 +19,7 @@ type FunctionLength struct { func (r *FunctionLength) configure(arguments lint.Arguments) { r.Lock() - r.Unlock() + defer r.Unlock() if !r.configured { maxStmt, maxLines := r.parseArguments(arguments) r.maxStmt = int(maxStmt)