mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
Fix SA2003, deferred Lock right after locking
This commit is contained in:
parent
28d273c8b2
commit
f3a5057968
@ -121,7 +121,7 @@ func (r *ServiceRegistry) WatchServices(ctx api.Context, options *api.ListOption
|
||||
|
||||
func (r *ServiceRegistry) ExportService(ctx api.Context, name string, options unversioned.ExportOptions) (*api.Service, error) {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
|
||||
return r.Service, r.Err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user