fix(inputs.ethtool): Close namespace (#12815)

This commit is contained in:
Joshua Powers 2023-03-09 04:00:02 -07:00 committed by GitHub
parent d063dc2e58
commit 603cdfb620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -243,6 +243,7 @@ func (c *CommandEthtool) Interfaces(includeNamespaces bool) ([]NamespacedInterfa
c.Log.Errorf("Could not get initial namespace: %s", err)
return nil, err
}
defer initialNamespace.Close()
// Gather the list of namespace names to from which to retrieve interfaces.
initialNamespaceIsNamed := false