Browse Source

Merge pull request #2516 from yichengq/fix-sec

security: fix var shadowing in CreateOrUpdate
Xiang Li 10 years ago
parent
commit
98ef65ce77
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdserver/security/security.go

+ 1 - 1
etcdserver/security/security.go

@@ -197,7 +197,7 @@ func (s *Store) GetRole(name string) (Role, error) {
 }
 
 func (s *Store) CreateOrUpdateRole(role Role) (Role, error) {
-	role, err := s.GetRole(role.Role)
+	_, err := s.GetRole(role.Role)
 	if err == nil {
 		return s.UpdateRole(role)
 	}