-
Notifications
You must be signed in to change notification settings - Fork 338
Open
Description
here
Lines 781 to 797 in 098669c
| func toSecret(secretManager SecretManager, text Secret, file, ref string) (SecretReader, error) { | |
| if text != "" { | |
| return NewInlineSecret(string(text)), nil | |
| } | |
| if file != "" { | |
| return NewFileSecret(file), nil | |
| } | |
| if ref != "" { | |
| if secretManager == nil { | |
| return nil, errors.New("cannot use secret ref without manager") | |
| } | |
| return &refSecret{ | |
| ref: ref, | |
| manager: secretManager, | |
| }, nil | |
| } | |
| return nil, nil |
because the error is nil, we may/would be moving nils around, leading to nil pointer dereference
may be the cause of prometheus/prometheus#16622
Metadata
Metadata
Assignees
Labels
No labels