mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
Merge pull request #111273 from Abirdcfly/automated-cherry-pick-of-#111235-upstream-release-1.23
Automated cherry pick of #111235: fix a possible panic because of taking the address of nil
This commit is contained in:
commit
e9dbbc3f74
1 changed files with 1 additions and 1 deletions
|
|
@ -51,10 +51,10 @@ func (a *PromptingAuthLoader) LoadAuth(path string) (*clientauth.Info, error) {
|
|||
// Prompt for user/pass and write a file if none exists.
|
||||
if _, err := os.Stat(path); os.IsNotExist(err) {
|
||||
authPtr, err := a.Prompt()
|
||||
auth := *authPtr
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
auth := *authPtr
|
||||
data, err := json.Marshal(auth)
|
||||
if err != nil {
|
||||
return &auth, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue