Skip to content

Commit

Permalink
lessor: fix le.itemMap leak after lease id revoked
Browse files Browse the repository at this point in the history
Signed-off-by: qsyqian <[email protected]>
  • Loading branch information
qsyqian committed Jun 8, 2023
1 parent a708bed commit 771acfc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/lease/lessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@ func (le *lessor) Detach(id LeaseID, items []LeaseItem) error {

l := le.leaseMap[id]
if l == nil {
for _, it := range items {
delete(le.itemMap, it)
}
return ErrLeaseNotFound
}

Expand Down

0 comments on commit 771acfc

Please sign in to comment.