Skip to content

Commit

Permalink
fix: add missing defer when unlocking mutex (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Aug 25, 2023
1 parent 9a87e6f commit 0357df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rule/function-length.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0357df7

Please sign in to comment.