Skip to content

Commit 0357df7

Browse files
authored
fix: add missing defer when unlocking mutex (#879)
1 parent 9a87e6f commit 0357df7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rule/function-length.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type FunctionLength struct {
1919

2020
func (r *FunctionLength) configure(arguments lint.Arguments) {
2121
r.Lock()
22-
r.Unlock()
22+
defer r.Unlock()
2323
if !r.configured {
2424
maxStmt, maxLines := r.parseArguments(arguments)
2525
r.maxStmt = int(maxStmt)

0 commit comments

Comments
 (0)