Skip to content

Commit

Permalink
Defer buf
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoo committed Aug 14, 2024
1 parent 5c12ecb commit 0534ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions huma.go
Original file line number Diff line number Diff line change
Expand Up @@ -1292,8 +1292,8 @@ func Register[I, O any](api API, op Operation, handler func(context.Context, *I)
}
}

buf.Reset()
bufPool.Put(buf)
defer bufPool.Put(buf)
defer buf.Reset()
}
}
}
Expand Down

0 comments on commit 0534ce8

Please sign in to comment.