@@ -118,7 +118,7 @@ type dockerClient struct {
118118
119119 // Private state for setupRequestAuth
120120 tokenCacheLock sync.Mutex // Protects tokenCache.
121- tokenCache map [string ]bearerToken
121+ tokenCache map [string ]* bearerToken
122122 // Private state for detectProperties:
123123 detectPropertiesOnce sync.Once // detectPropertiesOnce is used to execute detectProperties() at most once.
124124 detectPropertiesError error // detectPropertiesError caches the initial error.
@@ -275,7 +275,7 @@ func newDockerClient(sys *types.SystemContext, registry, reference string) (*doc
275275 registry : registry ,
276276 userAgent : userAgent ,
277277 tlsClientConfig : tlsClientConfig ,
278- tokenCache : map [string ]bearerToken {},
278+ tokenCache : map [string ]* bearerToken {},
279279 reportedWarnings : set .New [string ](),
280280 }, nil
281281}
@@ -756,7 +756,7 @@ func (c *dockerClient) obtainBearerToken(ctx context.Context, challenge challeng
756756 scopes = append (scopes , * extraScope )
757757 }
758758
759- var token bearerToken
759+ var token * bearerToken
760760 var inCache bool
761761 func () { // A scope for defer
762762 c .tokenCacheLock .Lock ()
@@ -777,7 +777,7 @@ func (c *dockerClient) obtainBearerToken(ctx context.Context, challenge challeng
777777 return "" , err
778778 }
779779
780- token = * t
780+ token = t
781781 func () { // A scope for defer
782782 c .tokenCacheLock .Lock ()
783783 defer c .tokenCacheLock .Unlock ()
0 commit comments