Skip to content

Commit

Permalink
ineffassign
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Feb 1, 2024
1 parent 3c9247a commit c79e3c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/osquery/table/program_icons_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func generateUninstallerProgramIcons() []map[string]string {
defer key.Close()

iconPath, _, err := key.GetStringValue("DisplayIcon")
if err != nil {
continue
}
icon, err := parseIcoFile(iconPath)
if err != nil {
continue
Expand Down Expand Up @@ -99,6 +102,9 @@ func generateInstallersProgramIcons() []map[string]string {
defer key.Close()

iconPath, _, err := key.GetStringValue("ProductIcon")
if err != nil {
continue
}
icon, err := parseIcoFile(iconPath)
if err != nil {
continue
Expand Down Expand Up @@ -126,6 +132,9 @@ func generateInstallersProgramIcons() []map[string]string {
func parseIcoFile(fullPath string) (icon, error) {
var programIcon icon
expandedPath, err := registry.ExpandString(fullPath)
if err != nil {
return programIcon, err
}
icoReader, err := os.Open(expandedPath)
if err != nil {
return programIcon, err
Expand Down

0 comments on commit c79e3c2

Please sign in to comment.