admin: Fix race in revokeSerials (#8107)
Redeclare `err` rather than assigning to the parent function's `err`, as there are multiple goroutines running. Thanks to @jsha for the diagnosis.
This commit is contained in:
parent
38a7197909
commit
b9f93b386f
|
@ -323,7 +323,7 @@ func (a *admin) revokeSerials(ctx context.Context, serials []string, reason revo
|
|||
go func() {
|
||||
defer wg.Done()
|
||||
for serial := range work {
|
||||
_, err = a.rac.AdministrativelyRevokeCertificate(
|
||||
_, err := a.rac.AdministrativelyRevokeCertificate(
|
||||
ctx,
|
||||
&rapb.AdministrativelyRevokeCertificateRequest{
|
||||
Serial: serial,
|
||||
|
|
Loading…
Reference in New Issue