mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #102555 from wzshiming/fix/close-modules-file
Close the used modules file
This commit is contained in:
commit
e692207857
@ -633,6 +633,7 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to read file /proc/modules with error %v", err)
|
||||
}
|
||||
defer modulesFile.Close()
|
||||
|
||||
mods, err := getFirstColumn(modulesFile)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user