Commit cfe6769f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #45508 from sjenning/fix-plugin-loader

Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320) check for walkErr before fileInfo deref Fixes #45507 @derekwaynecarr @fabianofranz
parents 6316ecef 77ac3290
......@@ -67,7 +67,7 @@ func (l *DirectoryPluginLoader) Load() (Plugins, error) {
// read the base directory tree searching for plugin descriptors
// fails silently (descriptors unable to be read or unmarshalled are logged but skipped)
err = filepath.Walk(base, func(path string, fileInfo os.FileInfo, walkErr error) error {
if fileInfo.IsDir() || fileInfo.Name() != PluginDescriptorFilename || walkErr != nil {
if walkErr != nil || fileInfo.IsDir() || fileInfo.Name() != PluginDescriptorFilename {
return nil
}
......
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