Commit de227b62 authored by Michael Yang's avatar Michael Yang
Browse files

fix nil pointer dereference

parent 63def6ca
......@@ -1300,7 +1300,7 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR
}
func makeRequest(ctx context.Context, method string, requestURL *url.URL, headers http.Header, body io.Reader, regOpts *RegistryOptions) (*http.Response, error) {
if requestURL.Scheme != "http" && regOpts.Insecure {
if requestURL.Scheme != "http" && regOpts != nil && regOpts.Insecure {
requestURL.Scheme = "http"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment