mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Close the used modules file
This commit is contained in:
parent
1677d939fb
commit
506fabc9ab
@ -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