Skip to content

Commit

Permalink
[CWS] improve check
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Feb 13, 2022
1 parent 32a61d8 commit 1802e22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/kernel/find_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func validateHeaderDirs(hv Version, dirs []string, checkCritical bool) []string
valid = append(valid, d)
}

if checkCritical && !containsCriticalHeaders(valid) {
if checkCritical && len(valid) != 0 && !containsCriticalHeaders(valid) {
log.Errorf("error validating %s: missing critical headers", valid)
return nil
}
Expand Down

0 comments on commit 1802e22

Please sign in to comment.