mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(host-deployer): elfherader fd leak (#19475)
This commit is contained in:
@@ -518,6 +518,7 @@ func (l *sLinuxRootFs) GetArch(rootFs IDiskPartition) string {
|
||||
log.Errorf("failed read file elf %s: %s", rp, err)
|
||||
continue
|
||||
}
|
||||
defer elfHeader.Close()
|
||||
// https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
|
||||
switch elfHeader.Machine {
|
||||
case elf.EM_X86_64:
|
||||
|
||||
Reference in New Issue
Block a user